2020
10-30
10-30
Java如何实现简单后台访问并获取IP
后台服务端importjava.io.IOException;importjava.io.InputStream;importjava.io.OutputStream;importjava.io.PrintWriter;importjava.net.ServerSocket;importjava.net.Socket;publicclassServer{publicstaticvoidmain(String[]args)throwsIOException{ServerSockets=newServerSocket(1122);//服务器端口号Socketss=s.accept();//获取IP访问者IP地址Stringcip=ss.getInetAddress()....
继续阅读 >