Exemplo n.º 1
0
        public async Task Write(object message, SimFlag flag = SimFlag.None)
        {
            if (_closed)
            {
                throw new IOException("Socket closed");
            }
            var packet = new SimPacket(_socket.Endpoint, RemoteAddress, message, _sequenceNumber, _ackNumber, flag);

            _socket.SendMessage(packet);
            _sequenceNumber++;
        }
Exemplo n.º 2
0
 public SimPacket(SimEndpoint source, SimEndpoint destination, object payload,
                  uint seqNumber,
                  uint ackNumber,
                  SimFlag flag)
 {
     Source      = source;
     Destination = destination;
     Payload     = payload;
     SeqNumber   = seqNumber;
     AckNumber   = ackNumber;
     Flag        = flag;
 }