Home Forums Support new TCPConnection WITHOUT being reused Reply To: new TCPConnection WITHOUT being reused

#4039
Anonymous
Inactive

Hello Marc,

I see what you are suggesting, and I am doing so, however, the problem is NOT with the server, the problem is with the clients.

If you see the code I posted in the original topic, I’m using the packet type “RequestReply”.
The problem is that if I have the multiple clients sending the same packet type at the same time, the replies which are handled by the server and using the same example as in the Sync send/receive (https://networkcomms.net/synchronous-send-and-receive/)

My code (in the server) is something like this:


private void ProcessRequestReply<T>(PacketHeader packetHeader, Connection connection, T inputObject)
{
      BasicRequest input = null;
      input = inputObject as BasicRequest;

      string errorText = String.Format("!!!dummy error|{0}|{1}", -100, "Error Message with reason");
      connection.SendObject("Reply", new BasicReply(input.MessageId, errorText));
}

The reply is sent to the connection that is shared by all clients, so there is no way to be sure who will receive it.

Am I making sense now?

Regards
Joao

  • This reply was modified 7 years, 3 months ago by .