[ Previous ] [ Contents ] [ Index ] [ Next ]



Register a socket callback function and create socket


    int Ns_SockListenCallback (
    char* address, 
    int port, 
    Ns_SockProc* proc, 
    void* ctx


Ns_SockListenCallback registers a user-defined socket callback function and should be called by your module at startup time. It also creates, binds, and listens on the socket (with the specified address and port) for you.

The proc is your socket callback function. The ctx argument is your context which will be passed back as the second argument of your callback function.

The when argument is a bitmask with one or more of the following options specified:


the socket is readable


the server is shutting down


Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.