12345678910111213141516171819202122232425 |
- 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) {}
- }
- }
|