internal void Send(ProtocolChannel <TSender> protocolChannel, byte[] bytes) { if (!protocolChannel.Announced) { lock (this._protocols) if (!protocolChannel.Announced) { this.Reset(protocolChannel); } } this._channel.Send(ByteHelper.InsertByte(protocolChannel.Id, bytes)); }
public void SetProtocol(byte protocolId, string protocolName) { this._channel.Send(ByteHelper.InsertByte(protocolId, Encoding.UTF8.GetBytes(protocolName))); }