Serversocket handling multiple http (not)

I have a relatively simple server socket app that I can’t get to work with more than one simultaneous connection. It really needs to handle a max of 10 http posts to it. I can see/log the sockets getting spawned but when a post happens to the app it get handle great, but an additional post immediately gets rejected. When data is available on the socket, I immediately read it all and get out of the event, but I can’t send a response down the socket and close it until some decently intensive work is done elsewhere, but I think I have everything in a nice “state” driven cycle and the app/gui remains responsive while this is going on… but as I stated, if another post comes in, it never hits a second sockets data available event. Pausing the app the server socket shows as listening and the second+ socket is correctly showing not connected. I am not getting an error events raised on the server socket.

Is there something else I need to do to thread? the management of the socket while it is still open so that a second+ socket can be serviced? Running Xojo 2014.1 on OS X 10.10 and 10.8

Your “decently intensive” work is being done in a thread? How do you identify which socket to send the response to?

[quote=164456:@Todd Fantz]I have a relatively simple server socket app that I can’t get to work with more than one simultaneous connection. It really needs to handle a max of 10 http posts to it. I can see/log the sockets getting spawned but when a post happens to the app it get handle great, but an additional post immediately gets rejected. When data is available on the socket, I immediately read it all and get out of the event, but I can’t send a response down the socket and close it until some decently intensive work is done elsewhere, but I think I have everything in a nice “state” driven cycle and the app/gui remains responsive while this is going on… but as I stated, if another post comes in, it never hits a second sockets data available event. Pausing the app the server socket shows as listening and the second+ socket is correctly showing not connected. I am not getting an error events raised on the server socket.

Is there something else I need to do to thread? the management of the socket while it is still open so that a second+ socket can be serviced? Running Xojo 2014.1 on OS X 10.10 and 10.8[/quote]

Look at the queue example I posted in https://forum.xojo.com/19472-threads-and-timers-how-to-manage-multiple/

Well, the weird thing is that if I move the server socket from a module to a window, and change nothing else, it works. Will try and isolate, but I have flipped this back and forth 3 times now, and moving the server socket is all that is needed.