_onHeader (header) {
    if (header === 0) {
      // Message boundary
      let message
      switch (this._currentMessage.length) {
        case 0:
          // Keep alive chunk, sent by server to keep network alive.
          return this.AWAITING_CHUNK
        case 1:
          // All data in one chunk, this signals the end of that chunk.
          message = this._currentMessage[0]
          break
        default:
          // A large chunk of data received, this signals that the last chunk has been received.
          message = new CombinedBuffer(this._currentMessage)
          break
      }
      this._currentMessage = []
      this.onmessage(message)
      return this.AWAITING_CHUNK
    } else {
      this._chunkSize = header
      return this.IN_CHUNK
    }
  }
Called when a complete chunk header has been received