1. ssssoooocccckkkkeeeetttt____aaaaccccqqqquuuuiiiirrrreeee((((3333)))) MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444)))) ssssoooocccckkkkeeeetttt____aaaaccccqqqquuuuiiiirrrreeee((((3333))))
    2. NNNNAAAAMMMMEEEE
    3. socket_acquire() - assume ownership of a socket
    4. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
    5. #include <socket_err.h>
    6. int socket_acquire( int socket, string read_callback,
    7. string write_callback,
    8. string close_callback );
    9. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
    10. socket_acquire() is called to complete the handshake begun
    11. by socket_release() for transferring ownership (and control)
    12. of a socket to a new object. socket_release() calls the
    13. release callback function within the new owner object to
    14. notify the object that it wishes to pass control of the
    15. socket on. It is the responsibility of the new owner socket
    16. to decide whether it wishes to accept the socket. It it
    17. does, then socket_acquire() is called to complete the
    18. transfer. If not, then the callback simply returns without
    19. completing the handshake.
    20. In the former case the handshake is completed and the new
    21. object becomes the socket owner. The read, write and close
    22. callback function parameters refer to functions within the
    23. new object. These are specified so that the MudOS driver
    24. will know which functions to call within the new object.
    25. Decling to acquire the socket will cause socket_release() to
    26. return EESOCKNOTRLSD so the owner can perform appropriate
    27. clean-up.
    28. socket_acquire() may only be called within the context of
    29. thr release callback function and only with the socket
    30. specified.
    31. SSSSEEEEEEEE AAAALLLLSSSSOOOO
    32. socket_release(3)
    33. Page 1 (Writen 5/23/97)