Results 1 to 8 of 8
- 03-14-2011, 07:54 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 30
- Rep Power
- 0
question about example i found on internet
Hey i want to build a multithreaded server and client and i go to google -.-
to look for some example and i found a really good one this :
Multi-threaded Client/Server Applications
and i want to ask why it can only accept until 10 connection and not more than 10 ??
- 03-14-2011, 08:12 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
I'm not sure that you've read the complete article or not?
Didn't you find the following?
// This chat server can accept up to 10 clients' connections
static clientThread t[] = new clientThread[10];
- 03-14-2011, 04:05 PM #3
Member
- Join Date
- Feb 2011
- Posts
- 30
- Rep Power
- 0
yee thats my question why it can accept only 10 connection i mean if i will change the array to 100 or 200 (how many i wish) it will work to ?
Last edited by niba10; 03-14-2011 at 05:06 PM.
- 03-16-2011, 09:47 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Did you try it? Change the value and run your application and see yourself.
- 03-21-2011, 09:46 PM #5
Member
- Join Date
- Feb 2011
- Posts
- 30
- Rep Power
- 0
i changed to 15 and it still can only connect up to 10 connections ..
but why its happen and cannot connect more then 10 ??
- 03-23-2011, 01:12 AM #6
Member
- Join Date
- Feb 2011
- Posts
- 30
- Rep Power
- 0
some one know why its happen and can explain please ??
- 03-23-2011, 04:48 AM #7
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Read the rest of the code ...
Java Code:for(int i=0; i<=9; i++){ if(t[i]==null) { (t[i] = new clientThread(clientSocket,t)).start(); break; } }
- 03-23-2011, 05:32 AM #8
Similar Threads
-
Internet search
By mikerada6 in forum Advanced JavaReplies: 2Last Post: 11-23-2010, 02:23 AM -
Dial to internet
By newbiejava in forum New To JavaReplies: 0Last Post: 07-05-2010, 08:50 AM -
RMI through Internet.???
By bach_meoden in forum NetworkingReplies: 8Last Post: 05-19-2010, 02:48 PM -
My Web App on Internet
By orion_mcl in forum Advanced JavaReplies: 1Last Post: 03-14-2010, 09:13 PM -
Internet Explorer
By maria.mt in forum New To JavaReplies: 2Last Post: 04-17-2009, 05:10 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks