1*61185Sbostic.\" Copyright (c) 1983, 1991, 1993 2*61185Sbostic.\" The Regents of the University of California. All rights reserved. 320263Smckusick.\" 443568Strent.\" %sccs.include.redist.man% 520263Smckusick.\" 6*61185Sbostic.\" @(#)shutdown.2 8.1 (Berkeley) 06/04/93 738053Sbostic.\" 847208Scael.Dd 947208Scael.Dt SHUTDOWN 2 1047208Scael.Os BSD 4.2 1147208Scael.Sh NAME 1247208Scael.Nm shutdown 1347208Scael.Nd shut down part of a full-duplex connection 1447208Scael.Sh SYNOPSIS 1547208Scael.Fd #include <sys/socket.h> 1647208Scael.Ft int 1747208Scael.Fn shutdown "int s" "int how" 1847208Scael.Sh DESCRIPTION 1920263SmckusickThe 2047208Scael.Fn shutdown 2120263Smckusickcall causes all or part of a full-duplex connection on 2220263Smckusickthe socket associated with 2347208Scael.Fa s 2420263Smckusickto be shut down. 2547208ScaelIf 2647208Scael.Fa how 2747208Scaelis 0, further receives will be disallowed. 2847208ScaelIf 2947208Scael.Fa how 3047208Scaelis 1, further sends will be disallowed. 3147208ScaelIf 3247208Scael.Fa how 3347208Scaelis 2, further sends and receives will be disallowed. 3447208Scael.Sh DIAGNOSTICS 3547208ScaelA 0 is returned if the call succeeds, -1 if it fails. 3647208Scael.Sh ERRORS 3720263SmckusickThe call succeeds unless: 3847208Scael.Bl -tag -width ENOTCONNAA 3947208Scael.It Bq Er EBADF 4047208Scael.Fa S 4120263Smckusickis not a valid descriptor. 4247208Scael.It Bq Er ENOTSOCK 4347208Scael.Fa S 4420263Smckusickis a file, not a socket. 4547208Scael.It Bq Er ENOTCONN 4620263SmckusickThe specified socket is not connected. 4747208Scael.El 4847208Scael.Sh SEE ALSO 4947208Scael.Xr connect 2 , 5047208Scael.Xr socket 2 5147208Scael.Sh HISTORY 5247208ScaelThe 5347208Scael.Nm 5447208Scaelfunction call appeared in 5547208Scael.Bx 4.2 . 56