//服务器监听:
ServerSocket s=
new
ServerSocket ( port );
Socket socket=s.accept();
//客户端连接:
Socket socket=
Socket ( String ip,
int
port );