在本篇文章中,先介绍一下Socket编程的一些API,然后利用这些API实现一个客户端-服务器模型的一个简单通信例程.该例子中,服务器接收到客户端的信息后,将信息重新发送给客户端. socket()函数 socket()函数用于创建一个套接字.这就好像购买了一个电话.不过该电话还没有分配号码. #include <sys/types.h> #include <sys/socket.h> int socket(int domain, int type, int protocol) 参…
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…