unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



shutdown(2)							  shutdown(2)



NAME
  shutdown - Shuts down	socket send and	receive	operations

SYNOPSIS

  #include <&lt;sys/socket.h>&gt;
  int shutdown (
	  int socket,
	  int how );

STANDARDS

  Interfaces documented	on this	reference page conform to industry standards
  as follows:

  shutdown():  XNS5.0

  Refer	to the standards(5) reference page for more information	about indus-
  try standards	and associated tags.

PARAMETERS

  socket    Specifies the file descriptor of the socket.

  how	    Specifies the type of shutdown.  Values are:

	    SHUT_RD   To disable further receive operations

	    SHUT_WR   To disable further send operations

	    SHUT_RDWR To disable further send operations and receive opera-
		      tions

DESCRIPTION

  The shutdown() function disables receive and/or send operations on the
  specified socket.

RETURN VALUES

  Upon successful completion, a	value of 0 (zero) is returned.	Otherwise, a
  value	of -1 is returned and errno is set to indicate the error.

ERRORS

  If the shutdown() function fails, errno may be set to	one of the following
  values:

  [EBADF]   The	socket parameter is not	valid.

  [EINVAL]  The	how argument is	invalid.

  [ENOBUFS] Insufficient resources are available in the	system to complete
	    the	call.

  [ENOSR]   The	available STREAMS resources were insufficient for the opera-
	    tion to complete.

  [ENOTCONN]
	    The	socket is not connected.

  [ENOTSOCK]
	    The	socket parameter refers	to a file, not a socket.

RELATED	INFORMATION

  Functions: getsockopt(2), read(2), recv(2), recvfrom(2), recvmsg(2),
  select(2), send(2), sendto(2), setsockopt(2),	socket(2), write(2)

  Standards: standards(5)