Macintosh Development |
[Home]
[About Us]
[People]
[Information Systems]
[Kerberos for Macintosh]
[Applications]
[Miscellaneous Documentation]
Sockets Control Functions |
OSStatus AbortSocketOperation (int sockFD);
AbortSocketOperation
stops the current pending operation on the socketSockFD
and closes the socket. This is how your application should implement command-. cancelling of socket operations. If there is no pending activity on the socket,AbortSocketOperation
will just close the socketSockFD
.You should not call
socket_close()
onSockFD
after calling this function.OSStatus AbortAllDNSOperations (void);
AbortAllDNSOperations
stops all current pending DNS operations. This currently includes all pending calls togethostbyname()
,gethostbyaddr()
,gethostname()
andgethostaddr()
. Your application should use this implement command-. cancelling during a DNS query.If there are no pending DNS operations,
AbortAllDNSOperations
will return without doing anything.Boolean IsValidSocket (int sockFD);
IsValidSocket
returns whether a given socket is still valid. The call exists because when a user changes settings in the TCP/IP control panel, the TCP/IP provider may be unloaded and reloaded, invalidating all your sockets. If you then try any socket calls, you will get anENOTSOCK
. If you wish to know whether a socket has been invalidated prior to any socket calls (say you're porting a UNIX library and don't want to rewrite it to handleENOTSOCK
in every socket call), then you can useIsValidSocket
beforehand instead.
Questions or comments? Send mail to macdev@mit.edu
Last updated on $Date: 2003/11/19 20:49:16 $
Last modified by $Author: smcguire $