re:looking for winsock listener tcp c++ example that supports multiple potential clients
-
Looking for c++ winsock example code that will enable the following: Allow for multiple clients each on a different machine ie different ip address to connect in. I would like to listen on the same port for all clients and also once connectivity is established be able to send and receive using this same port for each and all the connections. Currently, with the code I have written connections seem to get established and I initially receive data from the client but when I attempt to send to client I do not get any errors but the client isn't receiving my message either. Then when viewed in Wireshark I see that the messages are associated with "ezmessagesrv". Something to do with unknown caller. One question, the server socket I use to establish the bind and listen, once the accept returns successfully with the new client socket connection should I close the server socket (the one I use to do the listening) and reinitialize before attempting to listen for other client connections?
-
Looking for c++ winsock example code that will enable the following: Allow for multiple clients each on a different machine ie different ip address to connect in. I would like to listen on the same port for all clients and also once connectivity is established be able to send and receive using this same port for each and all the connections. Currently, with the code I have written connections seem to get established and I initially receive data from the client but when I attempt to send to client I do not get any errors but the client isn't receiving my message either. Then when viewed in Wireshark I see that the messages are associated with "ezmessagesrv". Something to do with unknown caller. One question, the server socket I use to establish the bind and listen, once the accept returns successfully with the new client socket connection should I close the server socket (the one I use to do the listening) and reinitialize before attempting to listen for other client connections?
Well their are differences between implementations of the Windows version and *nix. Here is the link
-
Looking for c++ winsock example code that will enable the following: Allow for multiple clients each on a different machine ie different ip address to connect in. I would like to listen on the same port for all clients and also once connectivity is established be able to send and receive using this same port for each and all the connections. Currently, with the code I have written connections seem to get established and I initially receive data from the client but when I attempt to send to client I do not get any errors but the client isn't receiving my message either. Then when viewed in Wireshark I see that the messages are associated with "ezmessagesrv". Something to do with unknown caller. One question, the server socket I use to establish the bind and listen, once the accept returns successfully with the new client socket connection should I close the server socket (the one I use to do the listening) and reinitialize before attempting to listen for other client connections?
Double posting, already answered you here[^].