JUCE Socket question / suggestion


#1

Hello,

I could not find a way to set a StreamingSocket to non-blocking mode without modifying juce_Socket.cpp. When creating a listener socket, it would be nice to set it to non-blocking mode so a single threaded application could poll the waitForNextConnection() method without having accept() block. Am I missing something or is this not available?

I also could not find a way to set a broadcast mask (or broadcast address) for DatagramSockets. I see that there is an allowBroadcast parameter when creating the DatagramSocket, but I couldn’t find a way of setting the address to broadcast to. I’m probably just missing something.

I just created my own classes based on juce_Socket.cpp that includes these two features, but it would be nice see if there was a way to do it with the standard code.

Thank you,

David A. Hoatson