Results 1 to 1 of 1
- 11-19-2011, 02:59 PM #1
Member
- Join Date
- Jun 2011
- Posts
- 7
- Rep Power
- 0
NIO Help - Dividing clients on different threads
Introduction:
I'm currently working on a free time project witch basically accepts connections.
As we know with NIO, you can use one thread to listen to many different connections using Selector.
I've followed this guide on how to make a non-blocking server + client (Rox Java NIO Tutorial).
Problem:
My problem is that when accepting connections on a Selector, it is directly assigned to the selector instead of being
able to put it into a selector by myself.
What I want to accomplish is lets say I have 100 clients connected, and I want to split them all up into 10 clients per thread.
So 1 Selector, 10 clients. But reading the NIO documentation on Java, I have to say it's rather vague on both functions within
the NIO API, and how it works.
Anyone have experience using non-blocking sockets? Any other good tutorials? Or an idea on how I could implement what I just described?
Similar Threads
-
dividing the number range
By koneru_18 in forum New To JavaReplies: 1Last Post: 06-28-2011, 09:19 PM -
Dividing in java
By poop in forum New To JavaReplies: 4Last Post: 05-30-2011, 07:56 AM -
Dividing in Java
By hawaiifiver in forum New To JavaReplies: 19Last Post: 03-11-2011, 11:09 AM -
Dividing 3 items, please help.
By Quizzle23 in forum New To JavaReplies: 18Last Post: 02-24-2011, 06:42 AM -
Single server, multiple clients - JAVA sockets, No threads
By sadishm in forum NetworkingReplies: 1Last Post: 10-25-2010, 11:21 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks