What to use?
-
Im creating a client server app. One server and multiple clients. Every client is sending serialized messages to the server. Every message has to arrive (No UDP). What to use. Chould I use TCPclient and send one message and close connection to server or should I use something like TcpChannel (Not sure what it is, or if it can send serialized objects). The time between messages vary from miliseconds to hours.
-
Im creating a client server app. One server and multiple clients. Every client is sending serialized messages to the server. Every message has to arrive (No UDP). What to use. Chould I use TCPclient and send one message and close connection to server or should I use something like TcpChannel (Not sure what it is, or if it can send serialized objects). The time between messages vary from miliseconds to hours.
The best solution would be to use a TCPClient wrapped inside some sort of 'TCPManager' class that implements a timeout service. When you have to send a message the TCPManager class opens the connection and keeps it open for, say, 5 seconds before closind it again if there are no new messages to send.