![]() |
Macintosh Development |
[Home]
[About Us]
[People]
[Information Systems]
[Kerberos for Macintosh]
[Applications]
[Miscellaneous Documentation]
![]() |
Sockets Control Functions |
OSStatus AbortSocketOperation (int sockFD);
AbortSocketOperationstops the current pending operation on the socketSockFDand closes the socket. This is how your application should implement command-. cancelling of socket operations. If there is no pending activity on the socket,AbortSocketOperationwill just close the socketSockFD.You should not call
socket_close()onSockFDafter calling this function.OSStatus AbortAllDNSOperations (void);
AbortAllDNSOperationsstops 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,
AbortAllDNSOperationswill return without doing anything.Boolean IsValidSocket (int sockFD);
IsValidSocketreturns 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 handleENOTSOCKin every socket call), then you can useIsValidSocketbeforehand 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 $