/// <summary> /// Decode the specified context, input and output. /// </summary> /// <param name="context">Context.</param> /// <param name="input">Input.</param> /// <param name="output">Output.</param> protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List <object> output) { if (!input.IsReadable()) { return; } //The connection opcode. int id = input.ReadByte(); ConnectionOpcode type = ConnectionType.GetConnectionType(id); if (type == ConnectionOpcode.NONE) { return; } output.Add(new ConnectionRequest(type)); }
/// <summary> /// Initializes a new instance of the <see cref="T:Quavo.ConnectionResponse"/> class. /// </summary> /// <param name="type">Type.</param> public ConnectionResponse(ConnectionOpcode type) { this.Type = type; }
/// <summary> /// Initializes a new instance of the <see cref="T:Quavo.ConnectionRequest"/> class. /// </summary> /// <param name="type">Type.</param> public ConnectionRequest(ConnectionOpcode type) { this.Type = type; }