Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why does opening a java nio selector result in a socket level connection being created on a dynamic

 
Sudarshan Sreenivasan
Ranch Hand
Posts: 188
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to understand how the Java NIO library works ...

I have written some code which just opens multiple selectors



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
[Thumbnail for Capture.PNG]
Connections image
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!