Main Page   Compound List   File List   Compound Members   File Members  

lib/server.c File Reference

Gobj server source. More...

#include "gobj/server.h"
#include "gobj/iface.h"
#include "gobj/stream.h"
#include "gobj/threads.h"

Compounds

struct  gj_ServerIface_struct
struct  Gj_Server_struct
struct  gj_ServerListenParams_struct

Typedefs

typedef struct gj_ServerIface_struct gj_ServerIface
 Listen interface list typedef. More...

typedef struct gj_ServerListenParams_struct  gj_ServerListenParams
 Listen params structure. More...


Functions

int gj_server_listen_entry (Gj_Ctx* ctx, gj_ServerListenParams* params)
 Listen function entry. More...

int gj_server_bringUp (Gj_Ctx* ctx, gj_ServerIface* iface)
 Bring up a certain interface. More...

void gj_server_shutdown (Gj_Ctx* ctx, gj_ServerIface* iface)
 Shut down a certain interface. More...

void Gj_server_new (Gj_Ctx* ctx)
 Create a new server.

int Gj_server_restore (Gj_Ctx* ctx, Gj_ContainerId id)
 Restore the server from a container. More...

void Gj_server_delete (Gj_Ctx* ctx)
 Delete the server.

int Gj_server_save (Gj_Ctx* ctx, Gj_ContainerId id)
 Save the server to a container. More...

int Gj_server_readIfaces (Gj_Ctx* ctx, Gj_Stream* stream)
 Read the interfaces from a stream. More...

int Gj_server_writeIfaces (Gj_Ctx* ctx, Gj_Stream* stream)
 Write the interfaces to a stream. More...

int Gj_server_start (Gj_Ctx* ctx)
 Start the server. More...

void Gj_server_stop (Gj_Ctx* ctx)
 Stop the server.

int Gj_server_addIface (Gj_Ctx* ctx, Gj_Id* iface)
 Add an interface to the server. More...

int Gj_server_removeIface (Gj_Ctx* ctx, Gj_Id* iface)
 Remove an interface from the server. More...

int gj_server_serve (Gj_Ctx* ctx, Gj_Stream* stream)
 The main server serving routine. More...


Detailed Description

Gobj server source.


Typedef Documentation

typedef struct gj_ServerIface_struct gj_ServerIface
 

Listen interface list typedef.

For internal use only.

typedef struct gj_ServerListenParams_struct gj_ServerListenParams
 

Listen params structure.

For internal use only.


Function Documentation

int gj_server_listen_entry ( Gj_Ctx * ctx,
gj_ServerListenParams * params )
 

Listen function entry.

For internal use only.

int gj_server_bringUp ( Gj_Ctx * ctx,
gj_ServerIface * iface )
 

Bring up a certain interface.

For internal use only.

void gj_server_shutdown ( Gj_Ctx * ctx,
gj_ServerIface * iface )
 

Shut down a certain interface.

For internal use only.

int Gj_server_restore ( Gj_Ctx * ctx,
Gj_ContainerId id )
 

Restore the server from a container.

Returns:
0 on success, -1 otherwise

int Gj_server_save ( Gj_Ctx * ctx,
Gj_ContainerId id )
 

Save the server to a container.

Returns:
0 on success, -1 otherwise.

int Gj_server_readIfaces ( Gj_Ctx * ctx,
Gj_Stream * stream )
 

Read the interfaces from a stream.

Returns:
0 on success, -1 otherwise.

int Gj_server_writeIfaces ( Gj_Ctx * ctx,
Gj_Stream * stream )
 

Write the interfaces to a stream.

Returns:
0 on success, -1 otherwise.

int Gj_server_start ( Gj_Ctx * ctx )
 

Start the server.

Returns:
0 on success, -1 otherwise.

int Gj_server_addIface ( Gj_Ctx * ctx,
Gj_Id * iface )
 

Add an interface to the server.

Returns:
0 on success, -1 otherwise.

int Gj_server_removeIface ( Gj_Ctx * ctx,
Gj_Id * iface )
 

Remove an interface from the server.

If the server is running, it is stopped and then restarted.

Returns:
0 on success, -1 otherwise.

int gj_server_serve ( Gj_Ctx * ctx,
Gj_Stream * stream )
 

The main server serving routine.

The stream must be DELETED by this function in any case.

Returns:
0 on success, -1 otherwise.

For internal use only.


Generated at Fri Aug 17 18:28:59 2001 for Gobj by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000