Summary
The object-oriented IO::Socket library significantly simplifies network programming by eliminating much of the "noise code" handed down from the socket API's C heritage and replacing it with a clean and convenient interface. Throughout the remainder of this book we create IO::Socket objects using the class's flexible new() method, and use its object methods whenever they offer a clear syntactic advantage (e.g., $sock->accept()). In cases where there is no clear syntactic advantage, for example between read ($sock,$data,1024) and $sock->read ($data,1024), we use the Perl built-ins in order to benefit from the performance gains.
With the IO::Socket module it is easy to write simple client and server programs, such as the Web client and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access