1. ssssoooocccckkkkeeeetttt____rrrreeeelllleeeeaaaasssseeee((((3333)))) MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444)))) ssssoooocccckkkkeeeetttt____rrrreeeelllleeeeaaaasssseeee((((3333))))
    2. NNNNAAAAMMMMEEEE
    3. socket_release() - release ownership of a socket to another
    4. object
    5. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
    6. #include <socket_err.h>
    7. int socket_release( int socket, object ob,
    8. string release_callback );
    9. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
    10. socket_release() is used to change ownership (and control)
    11. of a socket to another object. It is useful in daemon
    12. objects (like inetd) which handle connection set-up and then
    13. transfer a connected socket to another object for further
    14. processing.
    15. Socket ownership transfer involves a handshake between the
    16. current owner object and the socket to which the current
    17. owner wishes to transfer the socket. The handshake is
    18. initiated when socket_release() is called. socket_release()
    19. does appropriate security/integrity checking and then calls
    20. the release_callback function in object ob. This function
    21. is used to notify ob that socket ownership is being
    22. transferred to it. It is then ob's responsibility to call
    23. socket_acquire() within the release callback function. If
    24. socket_acquire() is called then the handshake is complete
    25. and socket ownership has been successfully transferred to
    26. ob. ob may decline to accept responsibility for the socket
    27. by not calling socket_acquire(), in which case ownership
    28. does not change and the current socket owner must decide how
    29. to respond to this.
    30. If the socket owner is successfully transfered then
    31. socket_release() returns EESUCCESS. If ob does not accept
    32. ownership for the socket then EESOCKNOTRLSD is returned.
    33. Other errors can be returned based on security violation,
    34. bad socket descriptor vbalues, etc.
    35. SSSSEEEEEEEE AAAALLLLSSSSOOOO
    36. socket_acquire(3)
    37. Page 1 (Writen 5/23/97)