Perl shutdown Function

Advertisements


Description

This function disables a socket connection according to the value of HOW. The valid values for HOW are identical to the system call of the same name. A value of 0 indicates that you have stopped reading information from the socket.

A value of 1 indicates that you.ve stopped writing to the socket. A value of 2 indicates that you have stopped using the socket altogether.

Syntax

Following is the simple syntax for this function:

shutdown SOCKET, HOW

Return Value

This function returns 0 on failure and 1 on success.

Example

Following is the example code showing its basic usage:


When above code is executed, it produced following result




Advertisements
Advertisements