This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using NIO for Client Sockets  RSS feed

 
Sameer Amte
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to evaluate the use of NIO for Client Sockets. In our application, we are currently creating one thread per user and each thread has a client socket that is connected to the Server and is constantly get real-time updates.

I'm evaluating the possibility of using Selectors and Channels, so that I dont have to create a thread per user. I tried to tweak the samples provided by Sun and I dont seem to be getting a connect event when my client sockets connects to the server.

Here is my makeConnections method:



Thanks
Sameer
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!