Jump to content

Java .nio-ish extension


<?=$humour?>

Recommended Posts

I've been looking at Java (just research purposes!) recently, especially at the .nio library which has this package called socketchannels, which is cool. Used with channelselectors and managers and all that you can have an application run several socket servers at once and select the most unused one at each request, more or less. What I want to know is, has anyone heard, seen, though about doing this in PHP, I understand that it would only work for CLI or CGI, but still, COOL!
Link to comment
https://forums.phpfreaks.com/topic/9152-java-nio-ish-extension/
Share on other sites

Not exactly what I was looking for I'm afraid, I too have written several socket servers and clients in my time. Java's Socket Channel and Server Socket Channel are abstractions of the standard socket libraries, both of which contain inbuilt methods for selectability. I guess you have to know what the Java's .nio library is capable of, cause it's a bit difficult to explain. Basically it means that apparently thousands of socket connections can be made on one or a few threads, instead of a connection/thread. The ServerSocketChannel can select a SocketChannel based on readiness and have it process the request. There's more to it but that's the bit I like.
Link to comment
https://forums.phpfreaks.com/topic/9152-java-nio-ish-extension/#findComment-34030
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.