D
DerFubel
Guest
Hi, I'm trying to implement a feature with which each client can search for servers within the local network, so I'm making a server list before the actual server-client-connection is set up. My system works like this:
1) First the client sends a buffer using network_send_broadcast.
2) The buffer is received by the server, the server uses a) a server (tcp) to handle normal data traffic once the client is connected and b) a socket (created with network_create_socket_ext to detect the initial call from the client)
3) The server should then respond to the client by sending back a buffer which contains information that the client then uses to join the server (directly to the tcp server)
Step 1) and 2) are executed without any problems, but I can't figure out how I should code step 3.
And that's the problem. I don't know how I can send back data from the server to the client. Do I really need to set up a third "channel" using network_send_broadcast and network_create_socket_ext? Or is there a simple way to send data from my server object to the client object, withtout establishing a direct connection? This really confuses me
1) First the client sends a buffer using network_send_broadcast.
2) The buffer is received by the server, the server uses a) a server (tcp) to handle normal data traffic once the client is connected and b) a socket (created with network_create_socket_ext to detect the initial call from the client)
3) The server should then respond to the client by sending back a buffer which contains information that the client then uses to join the server (directly to the tcp server)
Step 1) and 2) are executed without any problems, but I can't figure out how I should code step 3.
And that's the problem. I don't know how I can send back data from the server to the client. Do I really need to set up a third "channel" using network_send_broadcast and network_create_socket_ext? Or is there a simple way to send data from my server object to the client object, withtout establishing a direct connection? This really confuses me