flash中通过XMLSocket监控生产系统 java服务器端程序(1)

package com;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class TestServer {

public static void main(String args[]){

try{

ServerSocket server = new ServerSocket(9999);

while(true) {

System.out.println("-------------------------------------------");

Socket client = server.accept();
System.out.println("Remote Host is "+ client.getInetAddress());
new ServerThread (client).start();
}
}catch (IOException ex){

ex.printStackTrace();
}
}

}

你可能感兴趣的:(socket)