New networking command needed for Threads
Posted: Thu Sep 06, 2012 2:40 am
When working with threads and server sockets, the existing command NetworkServerEvent() is inadequate. It does not give you enough information as it does not allow interrogation per EventClient().
I'd like to propose a new command: Result = NetworkConnectionEvent(EventClient()).
You would pass the EventClient() to this command, and information about specific connection would be returned to you. The returned result could use the same numbering scheme returned by NetworkServerEvent(), with the exception that it could never return #PB_NetworkEvent_Connect.
I believe that this is a very important requirement. I've been testing networking extensively, and it's my belief that sever sockets in threads cannot be done correctly with PureBasic alone as it is now. I am currently using the Windows API command ioctlsocket_() to return information about a socket in a thread.
I'd like to propose a new command: Result = NetworkConnectionEvent(EventClient()).
You would pass the EventClient() to this command, and information about specific connection would be returned to you. The returned result could use the same numbering scheme returned by NetworkServerEvent(), with the exception that it could never return #PB_NetworkEvent_Connect.
I believe that this is a very important requirement. I've been testing networking extensively, and it's my belief that sever sockets in threads cannot be done correctly with PureBasic alone as it is now. I am currently using the Windows API command ioctlsocket_() to return information about a socket in a thread.