Better Client/Server Networking?
Posted: Tue Jan 13, 2009 3:30 pm
Hi, and thanks for providing us with a wish section.
I've been recently looking up some questions I have regarding server/client functionality.
Firstly, is it right you can only have 1 server per application? I don't need a server at all for my application, however I did find this to be a little strange to limit the amount of listening ports (imagine trying to make a torrent client... nightmare).
Now what follows is only my understanding, having browsed through the foums and asked some questions.
Ok, this I find really annoying... You have a server listening on port 1000, a client connects on port 1000, the listening port is now basically a client sending information back and forth on port 1000. Nothing else can connect to the application because port 1000 is in use.
What needs to happen (IMHO) is the server needs to notify that there is a connection request on the active listening server. The server then needs to decide whether to accept the connection or refuse it (depending on IP, port of remote computer, this doesn't happen at present), and finally, if approved, the connection needs to be accepted on a new client (on a new port). The server keeps listening uninterupted.
I think too much emphasis is placed upon a connection being a 'Server' or a 'Client', as they are basically the same thing other than one listening, and the other connecting. You've made it really easy to accept connections, however, no need to bind or worry about any of the other stuff, so all credit to you there. I just feel alot is missing from these controls.
All clients should also have the funtionality to get their local IP and port and the remote IP and port at any time.
I've been recently looking up some questions I have regarding server/client functionality.
Firstly, is it right you can only have 1 server per application? I don't need a server at all for my application, however I did find this to be a little strange to limit the amount of listening ports (imagine trying to make a torrent client... nightmare).
Now what follows is only my understanding, having browsed through the foums and asked some questions.
Ok, this I find really annoying... You have a server listening on port 1000, a client connects on port 1000, the listening port is now basically a client sending information back and forth on port 1000. Nothing else can connect to the application because port 1000 is in use.
What needs to happen (IMHO) is the server needs to notify that there is a connection request on the active listening server. The server then needs to decide whether to accept the connection or refuse it (depending on IP, port of remote computer, this doesn't happen at present), and finally, if approved, the connection needs to be accepted on a new client (on a new port). The server keeps listening uninterupted.
I think too much emphasis is placed upon a connection being a 'Server' or a 'Client', as they are basically the same thing other than one listening, and the other connecting. You've made it really easy to accept connections, however, no need to bind or worry about any of the other stuff, so all credit to you there. I just feel alot is missing from these controls.
All clients should also have the funtionality to get their local IP and port and the remote IP and port at any time.