protected virtual void RaiseClientDisconnected(ClientGenericEventArgs <ClientConnectionBase> e)
 {
     OnClientDisconnected?.Invoke(this, e);
 }
 protected void RaiseConnected(ClientGenericEventArgs <ClientConnectionBase> args)
 {
     OnConnected?.Invoke(this, args);
 }
 protected void RaiseReceive(ClientGenericEventArgs <TTransportDataType> e)
 {
     OnReceive?.Invoke(this, e);
 }
 protected void RaiseError(ClientGenericEventArgs <Exception> e)
 {
     OnError?.Invoke(this, e);
 }
Esempio n. 5
0
        private void TcpOnReceive(object sender, ClientGenericEventArgs <byte[]> clientGenericEventArgs)
        {
            var proto = new BinaryProtocol(clientGenericEventArgs.DataReceived);

            Trace.WriteLine($"Package received {proto.GetCommandBytes()}");
        }