Socket 编程的步骤(面试题)

1、使用ServerSocket 类,监听某一个端口
2、使用socket.accept(),等待接收客户端的连接
3、使用Socket类,使用IP地址,端口号,创建客户端与服务端的连接