in reply to Threaded UDP Communication
When I create an instance of session I want it to send a login command and receive the reply and then have a thread that will receive and process each reply as it comes until the session is destroyed.I presume you create the thread after the login to take care of the case where the login fails.
My suggestion would be to rework your code so that you:
1. Create the session object.
2. Create a thread.
3. Login from the thread. If this fails, communicate this to the main thread.
4. Process commands.
|
|---|