Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ shutdown(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

connect

socket



SHUTDOWN(2,L)               AIX Technical Reference               SHUTDOWN(2,L)



-------------------------------------------------------------------------------
shutdown



PURPOSE

Shuts down part or all of a full-duplex connection.

SYNTAX

int shutdown (s, how)
int s, how;

DESCRIPTION

The shutdown system call allows you to disable receives, sends, or both on the
socket specified by the s parameter.  The action of the system call is
determined by the how parameter, according to the following values:

0   Disallows further receives.

1   Disallows further sends.

2   Disallows both further sends and receives.

RETURN VALUE

Upon successful completion, a value of 0 is returned.  If the shutdown system
call fails, a value of -1 is returned, and errno is set to indicate the error.

ERROR CONDITIONS

The system call fails if one or more of the following are true:

EBADF       The s parameter is not valid.

ENOTSOCK    The s parameter refers to a file, not a socket.

ENOTCONN    The socket is not connected.

EINVAL      The how parameter is invalid.

RELATED INFORMATION

In this book:  "connect" and "socket."









Processed November 7, 1990       SHUTDOWN(2,L)                                1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026