2 .\" Copyright (c) 2012 Apple Inc. All rights reserved.
4 .\" @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 .\" This file contains Original Code and/or Modifications of Original Code
7 .\" as defined in and that are subject to the Apple Public Source License
8 .\" Version 2.0 (the 'License'). You may not use this file except in
9 .\" compliance with the License. The rights granted to you under the License
10 .\" may not be used to create, or enable the creation or redistribution of,
11 .\" unlawful or unlicensed copies of an Apple operating system, or to
12 .\" circumvent, violate, or enable the circumvention or violation of, any
13 .\" terms of an Apple operating system software license agreement.
15 .\" Please obtain a copy of the License at
16 .\" http://www.opensource.apple.com/apsl/ and read it before using this file.
18 .\" The Original Code and all software distributed under the License are
19 .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 .\" Please see the License for the specific language governing rights and
24 .\" limitations under the License.
26 .\" @APPLE_OSREFERENCE_LICENSE_HEADER_END@
33 .Nd disconnects a connection on a socket
35 .Fd #include <sys/socket.h>
39 .Fa "associd_t associd"
45 is a socket. The communication domain of the socket determines the
46 availability and behavior of
53 issued on the connection identified by
55 or on all connections associated with the
61 specifies the association identifier. It may be set to
63 when there is only one association present;
65 to specify all existing associations; or one of the identifiers returned from
70 specifies the connection identifier. It may be set to
74 in which case the association represented by
76 will be dissolved; or the value returned from
80 which indicates that the disconnection occurs only on that connection
81 while keeping the session association intact. For the latter, the connection
84 will no longer be valid upon success.
88 function returns the value 0 if successful; otherwise the value of -1 is
89 returned and the global integer variable
91 is set to indicate the error.
95 system call succeeds unless:
99 Operation already in progress for the session association represented by
104 is not a valid descriptor.
111 argument is invalid or the underlying protocol is no longer attached to
115 The session association repreresented by
121 is a file, not a socket.
133 function call appeared in Darwin 13.0.0