blob: f29b8d0956cb0a031839f4649c10f84a51d41b0c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package com.juick.xmpp.s2s;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
/**
*
* @author ugnich
*/
public class ConnectionListener implements Runnable {
@Override
public void run() {
try {
ServerSocket listener = new ServerSocket(5269);
while (true) {
Socket sock = listener.accept();
ConnectionIn conn = new ConnectionIn(sock);
XMPPComponent.addConnectionIn(conn);
Thread t = new Thread(conn);
t.start();
}
} catch (IOException e) {
System.out.println("IOException on socket listen: " + e.toString());
}
}
}
|