예제 #1
0
        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));
        }
예제 #2
0
 public void SetProtocol(byte protocolId, string protocolName)
 {
     this._channel.Send(ByteHelper.InsertByte(protocolId, Encoding.UTF8.GetBytes(protocolName)));
 }