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

Ns_SockListenCallback

Overview

Register a socket callback function and create socket

Syntax

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

Description

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:

NS_SOCK_READ:

the socket is readable

NS_SOCK_EXIT:

the server is shutting down

    

Top of Page

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