Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within I/O and Streams
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
I/O and Streams
Why does opening a java nio selector result in a socket level connection being created on a dynamic
Sudarshan Sreenivasan
Ranch Hand
Posts: 188
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am trying to understand how the
Java
NIO library works ...
I have written some code which just opens multiple selectors
public static void main(String[] args) throws IOException, InterruptedException { Selector incomingMessageSelector = Selector.open(); Selector incomingMessageSelector1 = Selector.open(); Selector incomingMessageSelector2 = Selector.open(); Thread.sleep(900000L); }
Each time when i open a selector i can see connections being created at the socket level, so for example in this case 3 connections get created.
In the below image i have highligted those 3 connections being made to dynamic ports ...
This question is closely linked to the this one
Capture.PNG
Connections image
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
SocketChannel and OutputStream
Using NIO for Client Sockets
NIO Socket - connection problem
Detecting connection request
does a nio socket buffer data internally too?
More...