- Code: Select all
StreamingSocket* listenerSocket = new StreamingSocket();
bool createdOK = listenerSocket->createListener(port);
// try again
StreamingSocket* receiverSocket = listenerSocket->waitForNextConnection();
Now, most of the time this is fine, but sometimes the listenerSocket will not actually open a socket (corresponding port is closed when I check with nmap) and in this case the receiverSocket will never get a connection; however, createdOK will still always be true. As I see it, createdOK should be false if the listenerSocket cannot be opened. Am I missing something? Is there a different way I can check for the status of the socket?
EDIT: Using ubuntu 10.04, and Juce 1.51 (I know it's not the latest, an upgrade is not an option at this point)