SFML community forums
Help => Network => Topic started by: Azaral on November 07, 2012, 02:30:27 am
-
I'm trying to set up a server-client relationship in which the server can accept a number of clients. Do I need a socket for each client or can I service them all on one? Using UDP sockets btw.
I'm very very new to network programming. Any advice is appreciated.
-
UDP sockets are not connected, you can use a single socket for everyone.
-
Would there be an advantage to using more than one? If a packet is sent to a UDP socket, but the socket already accepted a packet and it hasn't been cleared out of the socket, will that second packet be lost or will it wait in a queue fashion or something?
-
There are independant send/receive buffers, so the only thing that might happen is that you send or receive too much data on the same socket and overflow one of the buffers.
-
OK. Thanks for your answers!