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.
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.
when argument is a bitmask with one or more of the following options specified: