This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Using NIO for Client Sockets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Using NIO for Client Sockets" Watch "Using NIO for Client Sockets" New topic
Author

Using NIO for Client Sockets

Sameer Amte
Ranch Hand

Joined: Oct 22, 2002
Posts: 38
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Using NIO for Client Sockets
 
Similar Threads
NIO Channels Object Transfer
NIO Channel -Object Transfer
ServerSocketChannel.accept() seems to create a random port to send data to?
selector.select() problem
does a nio socket buffer data internally too?