import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
public class Client {    public static void main(String args[]){
        try {
            Socket socket = new Socket("localhost", 9572);
            OutputStream out = socket.getOutputStream();
            out.write("这是我第一次访问服务器\n".getBytes());
            out.write("Hello\n".getBytes());
            out.write("exit\n".getBytes());
        } catch (UnknownHostException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}