Pages

Showing posts with label TCP. Show all posts
Showing posts with label TCP. Show all posts

Tuesday, April 29, 2003

Perl IO::Sockets


Introduction to IO::Sockets

A client and server program works this way. Simply put, a client requests a service and a server services the request. There are several ways to do this. The crudest will be to call a program within Perl and pass the parameters during the call. Another way is to use pipes.

A program can call another program but the input to the called program will be passed through the STDIN of the other program. Both methods are crude and allow only for simple passing of input and output. Another way to do this is using sockets.

Sockets allow two programs to communicate with each other. The server binds a port on the machine. The client connects to that port to communicate with the server,