06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

shutdown pNA+ <strong>System</strong> <strong>Calls</strong><br />

shutdown Terminates all or part of a full-duplex connection.<br />

#include <br />

long shutdown(<br />

int s, /* socket descriptor */<br />

int how /* shutdown mechanism */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

This system call is used to terminate all or part of a full-duplex connection on a<br />

specified socket. The socket may be shut down for sending, receiving, or both.<br />

s Specifies the socket to be shut down.<br />

how Specifies the shutdown mechanism. Three options are available, as<br />

follows:<br />

0 No further receives are allowed on the socket.<br />

1 No further sends are allowed on the socket.<br />

2 No further sends or receives are allowed on the socket.<br />

This system call returns 0 if successful, otherwise it returns -1.<br />

4-74 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!