AnsweredAssumed Answered

server listening to multiple sockets? select() function?

Question asked by JOHN ADAMSON on Aug 11, 2011
Latest reply on Oct 20, 2011 by gilles buloz
I'm trying to implement a TCP socket server that can listen to multiple connections, but all the MQX examples seem to show the server listening to a single connection at a time. Is there a way to structure the code so it's listening for both incoming connection requests and incoming data from already connected sockets? In Linux, I used the select statement, and had it checking both. Should these be separate tasks under MQX? One listening for new connections and spawning new tasks for each socket as it connects? Polling? (Yikes!) John

Outcomes