i’m trying to use StreamingSocket on a cross platform app, on windows i can use the StreamingSocket to connect to a remote server and send messages, but on osx, the same code is doing absolutely nothing.
I can verify that on OSX the StreamingSocket is actually not even trying to connect because of the timeout.
I kept the connect function with a 3s timeout in the main thread so when the server is not reachable, the whole program freezes for 3s, that way i know that my app tried to connect and failed (just for testing).
But on OSX, even if the server is not running, my app doesn’t freeze at all and the connect function returns false immediately.
Any idea ?
my basic code :
if (sender.isConnected()) sender.close(); bool result = sender.connect(useLocal->boolValue() ? "127.0.0.1" : remoteHost->stringValue(), remotePort->intValue()); isConnected->setValue(result);