void ReceiveSyn()
 {
     if (ConnectionEstablisherUtil.ExpectedPayloadReceived(connection, receiveQueue, SystemPayloads.Syn))
     {
         synReceived = true;
     }
 }
 void ReceiveAck()
 {
     if (ConnectionEstablisherUtil.ExpectedPayloadReceived(connection, receiveQueue, SystemPayloads.Ack))
     {
         IsConnected = true;
         Connected?.Invoke(connection);
     }
 }
 void ReceiveDisconnect()
 {
     if (ConnectionEstablisherUtil.ExpectedPayloadReceived(connection, receiveQueue, SystemPayloads.Disconnect))
     {
         IsConnected    = false;
         IsDisconnected = true;
         Disconnected?.Invoke(connection);
     }
 }
Exemple #4
0
 void ReceiveSynAckAndRespond()
 {
     if (ConnectionEstablisherUtil.ExpectedPayloadReceived(connection, receiveQueue, SystemPayloads.Syn | SystemPayloads.Ack))
     {
         IsConnected = true;
         Connected?.Invoke();
         connection.AddToSendQueue(connection.SystemChannelID, new[] { (byte)SystemPayloads.Ack });
     }
 }