@@ -0,0 +1,2220 @@
+import java.net.ServerSocket;%0Aimport java.net.Socket;%0A %0Apublic class SocketServer extends java.lang.Thread %7B%0A %0A    private boolean OutServer = false;%0A    private ServerSocket server;%0A    private final int ServerPort = 8765;// %E8%A6%81%E7%9B%A3%E6%8E%A7%E7%9A%84port%0A %0A    public SocketServer() %7B%0A        try %7B%0A            server = new ServerSocket(ServerPort);%0A %0A        %7D catch (java.io.IOException e) %7B%0A            System.out.println(%22Socket%E5%95%9F%E5%8B%95%E6%9C%89%E5%95%8F%E9%A1%8C !%22);%0A            System.out.println(%22IOException :%22 + e.toString());%0A        %7D%0A    %7D%0A %0A    public void run() %7B%0A        Socket socket;%0A        java.io.BufferedInputStream in;%0A %0A        System.out.println(%22%E4%BC%BA%E6%9C%8D%E5%99%A8%E5%B7%B2%E5%95%9F%E5%8B%95 !%22);%0A        while (!OutServer) %7B%0A            socket = null;%0A            try %7B%0A                synchronized (server) %7B%0A                    socket = server.accept();%0A                %7D%0A                System.out.println(%22%E5%8F%96%E5%BE%97%E9%80%A3%E7%B7%9A : InetAddress = %22%0A                        + socket.getInetAddress().getHostAddress());%0A                // TimeOut%E6%99%82%E9%96%93%0A                socket.setSoTimeout(15000);%0A %0A                in = new java.io.BufferedInputStream(socket.getInputStream());%0A                byte%5B%5D b = new byte%5B1024%5D;%0A                String data = %22%22;%0A                int length;%0A                while ((length = in.read(b)) %3E 0)// %3C=0%E7%9A%84%E8%A9%B1%E5%B0%B1%E6%98%AF%E7%B5%90%E6%9D%9F%E4%BA%86%0A                %7B%0A                    data += new String(b, 0, length);%0A                %7D%0A %0A                System.out.println(%22%E6%88%91%E5%8F%96%E5%BE%97%E7%9A%84%E5%80%BC:%22 + data);%0A                in.close();%0A                in = null;%0A                %0A                String record_of_Association_ID = %22SELECT * FROM %60Association%60 where %60Association_ID%60='%22+ data +%22'%22;%0A                ResourceAdaptor DB_manipulate = new ResourceAdaptor();%0A                Object %5B%5D result = DB_manipulate.SelectTable(record_of_Association_ID);%0A                //do some simple handling of IDs (notification, classification, regist/publish...)%0A                %0A                %0A                socket.close();%0A %0A            %7D catch (java.io.IOException e) %7B%0A                System.out.println(%22Socket%E9%80%A3%E7%B7%9A%E6%9C%89%E5%95%8F%E9%A1%8C !%22);%0A                System.out.println(%22IOException :%22 + e.toString());%0A            %7D%0A %0A        %7D%0A    %7D%0A %0A    /*public static void main(String args%5B%5D) %7B%0A        (new SocketServer()).start();%0A    %7D*/%0A %0A%7D%0A

Create SocketServer.java