Hi, I wrote a program that acts like a "bridge" between various clients and their server. The programs acts this way: for each connection from the clients, he opens a socket on the server. After this he starts listening on both sides. When something arrives from the client, the program simply places it on the socket of the server and send it away. When something arrives from the server, the program reads it, change its structure and send it to the client. Easy.
I have read around that is not always good to use one thread for one socket and that it's better to use a "multiplexer" style in which a thread handles multiple connections... Well, how to know whether to choose the "multiplexer" solution rather than the one-one solution?
Thanks!
Bookmarks