http://www.thegeekstuff.com/2010/07/perl-tcp-udp-socket-programming/ In this article, let us discuss how to write Perl socket programming using the inbuilt socket modules in Perl. Perl socket modules provides an object interface that makes it easier…
以Socket发送数据为例: 发送数据时候要声明:DataOutputStream os = new DataOutputStream(socket.getOutputStream()); 最近开发遇到的为题是我要向服务端发送图片,如果os.close()的话服务器可以收到图片但是我客户端的socket会受影响关闭.如果不用os.close()的话,服务器接收图片会有影响,查资料说调用socket.shutdownOutputStream();可以关闭输出流,而且不会影响socket发送数据.…