How can I connect many client in one server ?

Hello, My name is Fabio, i live in Brazil.I need that two or more conect the ane server socket.Who can help me ?
[133 byte] By [Fabio_Aurelio-Brasilia-Brasila] at [2007-11-26 18:21:32]
# 1

The language doesn't impose any limit.

The memory needed for data structures to manage them might limit it.

The processing time to serve them might limit it.

The OS might impose limits on per-user or per-process number of connections.

All that is highly dependent on your complete situation--hardware, OS, application, etc.

jverda at 2007-7-9 5:55:24 > top of Java-index,Archived Forums,Socket Programming...
# 2

> Hello, My name is Fabio, i live in Brazil.

>

> I need that two or more conect the ane server

> socket.

>

> Who can help me ?

Do you mean the common idiom?

// server code

while (true){

Socket s = serverSocket.accept();

new Thread(new ClientHandler(s)).start();

}

--

class ClientHandler implements Runnable{

Socket soc;

public ClientHandler(Socket so){

soc = so;

}

public void run(){

// do io using soc's io streams

...

}

}

hiwaa at 2007-7-9 5:55:24 > top of Java-index,Archived Forums,Socket Programming...
# 3
Great, Is a very good idea.Thank very match HIWA.
Fabio_Aurelio-Brasilia-Brasi at 2007-7-9 5:55:24 > top of Java-index,Archived Forums,Socket Programming...