ssssoooocccckkkkeeeetttt____rrrreeeelllleeeeaaaasssseeee((((3333)))) MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444)))) ssssoooocccckkkkeeeetttt____rrrreeeelllleeeeaaaasssseeee((((3333))))NNNNAAAAMMMMEEEEsocket_release() - release ownership of a socket to anotherobjectSSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS#include <socket_err.h>int socket_release( int socket, object ob,string release_callback );DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNsocket_release() is used to change ownership (and control)of a socket to another object. It is useful in daemonobjects (like inetd) which handle connection set-up and thentransfer a connected socket to another object for furtherprocessing.Socket ownership transfer involves a handshake between thecurrent owner object and the socket to which the currentowner wishes to transfer the socket. The handshake isinitiated when socket_release() is called. socket_release()does appropriate security/integrity checking and then callsthe release_callback function in object ob. This functionis used to notify ob that socket ownership is beingtransferred to it. It is then ob's responsibility to callsocket_acquire() within the release callback function. Ifsocket_acquire() is called then the handshake is completeand socket ownership has been successfully transferred toob. ob may decline to accept responsibility for the socketby not calling socket_acquire(), in which case ownershipdoes not change and the current socket owner must decide howto respond to this.If the socket owner is successfully transfered thensocket_release() returns EESUCCESS. If ob does not acceptownership for the socket then EESOCKNOTRLSD is returned.Other errors can be returned based on security violation,bad socket descriptor vbalues, etc.SSSSEEEEEEEE AAAALLLLSSSSOOOOsocket_acquire(3)Page 1 (Writen 5/23/97)
