Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using NIO for Client Sockets

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:

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic