I’ve set a serverSocket object to handle all of my easyTcpSocket class sessions. I’ve added a custom property to the easyTcpSocket class called ‘sessionId’. This property is populated with a unique ID that I assign when the connection is established. Is there any way to iterate through this in the main thread and compare sessionIds… like if I wanted to send one socket connection a particular message? I tried variations of the severSocket.activeConnections(); however, it expected a tcpSocket class and not an easyTcpSocket. What I want is probably fairly simple to do, but I’m making it complicated… like always. Any suggestions would be appreciated.
FYI… I don’t have to use the sessionId property. If I’m limited to just a handle of the object or something else, that’s fine. I just need to be able to process messages outbound to a specific socket connection.
Rick, that’s kind of what I just did. I added a global dictionary which added a key based on the unique ID, and set the value to the instance of the easyTcpSocket itself. Worked like a charm… thanks!