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++; }
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; }