listen.c File Reference

#include "nsd.h"

Data Structures

struct  ListenData

Functions

void NsInitListen (void)
int Ns_SockListenCallback (char *addr, int port, Ns_SockProc *proc, void *arg)
int Ns_SockPortBound (int port)

Function Documentation

int Ns_SockListenCallback ( char *  addr,
int  port,
Ns_SockProc *  proc,
void *  arg 
)

----------------------------------------------------------------------

Ns_SockListenCallback --

Listen on an address/port and register a callback to be run when connections come in on it.

Results: NS_OK/NS_ERROR

Side effects: None.

----------------------------------------------------------------------

Make sure we can bind to the specified interface.

Update the global hash table that keeps track of which ports we're listening on.

int Ns_SockPortBound ( int  port  ) 

----------------------------------------------------------------------

Ns_SockPortBound --

Determine if we're already listening on a given port on any address.

Results: Boolean: true=yes, false=no.

Side effects: None.

----------------------------------------------------------------------

void NsInitListen ( void   ) 

----------------------------------------------------------------------

NsInitListen --

Initialize listen callback API.

Results: None.

Side effects: None.

----------------------------------------------------------------------


Generated on Tue Sep 4 19:58:56 2007 by  doxygen 1.5.1