protected override BinaryRequestInfo ResolveRequestInfo(ArraySegment <byte> header, byte[] bodyBuffer, int offset, int length) { byte[] Name_Byte = header.CloneRange(0, 4); string cmd = BitConverter.ToString(Name_Byte); return(new BinaryRequestInfo(Encoding.UTF8.GetString(header.Array, header.Offset, 4), bodyBuffer.CloneRange(offset, length))); }
protected override RequestInfo ResolveRequestInfo(ArraySegment <byte> header, byte[] bodyBuffer, int offset, int length) => new RequestInfo((KeyType)BitConverter.ToUInt16(header.CloneRange(0, 2), 0), bodyBuffer.CloneRange(offset, length));