The server maintains complex data structures for each client and does other work while it is operating and I don't want to have to make all of this code thread-safe. Having a separate thread for each client connection seems excessive and would add unnecessary complexity to the application, which currently runs quite happily as a single thread. I was dissappointed to see there do not appear to be any events in these classes and that it seems the closest equivalent to the DataArrival event is to do an asynchronous read, processing the received data in a separate thread - although I would prefer to be asynchronously notified of data arrival as I don't want to poll 500 clients repeatedly. ![]() I have been reading about the socket, tcplistener and tcpclient classes in. Each client is connected for long periods and has occasional conversations with the server. The application runs as a service and communicates with approximately 500 clients. ![]() I am converting an existing TCP server application that uses the winsock control from VB6 to vb.net.
0 Comments
Leave a Reply. |