25 lines
No EOL
438 B
Java
25 lines
No EOL
438 B
Java
package chat;
|
|
|
|
import java.io.IOException;
|
|
import java.net.ServerSocket;
|
|
import java.net.Socket;
|
|
import java.util.List;
|
|
|
|
public class ListenerStartThread extends Thread {
|
|
|
|
ServerSocket s;
|
|
List<Socket> dest_sockets;
|
|
ListenerStartThread(ServerSocket in_s, List<Socket> in_dest_sockets)
|
|
{
|
|
s = in_s;
|
|
dest_sockets = in_dest_sockets;
|
|
}
|
|
public void run()
|
|
{
|
|
try
|
|
{
|
|
dest_sockets.add(s.accept());
|
|
}
|
|
catch(IOException e) {}
|
|
}
|
|
} |