I am kind of shocked that this isn’t already in there. Juce is amazingly comprehensive in most all other areas.
I’d like to be able to do something like this:
[code]StreamingSocket s1;
DatagramSocket s2;
SocketList sockets;
sockets.addSocket(s1);
sockets.addSocket(s2);
while(true)
{
if(sockets.waitForData(200)) // wait 200ms
{
while(sockets.hasReadableSockets())
{
Socket &s = sockets.getNextReadable();
// do something
}
while(sockets.hasWritableSockets())
{
Socket &s = sockets.getNextWritable();
// do something
}
}
else
{
// timed out
}
}
[/code]
Any chance of something like this making its way into the codebase?