Quote Originally Posted by wysota View Post
The main thread also has (or at least can have) an event loop
In application (plugin) where it doesn't work, call to ClientSocked takes place not from the main thread. And in example above, where I use ClientSocket from main(), it works.
Quote Originally Posted by wysota View Post
Sure, but you are calling the socket's functions directly from the main thread which is forbidden.
You are right, connect and write had to be called also in run in this example.