Main Page   Compound List   File List   Compound Members   File Members  

lib/gobj/iface.h File Reference

IO interface management. More...

#include <gobjconfig.h>
#include <gobj/context.h>

Go to the source code of this file.

Compounds

struct  Gj_IfaceIncomingConn_struct
struct  Gj_IfaceFuncs_struct
struct  Gj_Iface_struct

Typedefs

typedef void Gj_IfaceData
 Iface configuration data.

typedef void Gj_IfacePort
 IO port typedef.

typedef struct Gj_IfaceIncomingConn_struct  Gj_IfaceIncomingConn
 IO incoming connection structure.

typedef Gj_IfacePortGj_Iface_openPortFunc (Gj_Ctx* ctx, Gj_Iface* iface, char* addr)
 IO function openPort typedef.

typedef int Gj_Iface_closePortFunc (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port)
 IO function closePort typedef.

typedef int Gj_Iface_writeFunc (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port, void* ptr, int size)
 IO function write typedef.

typedef int Gj_Iface_readFunc (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port, void* ptr, int size)
 IO function read typedef.

typedef int Gj_Iface_read2writeFunc (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port)
 IO function read2write typedef.

typedef int Gj_Iface_write2readFunc (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port)
 IO function write2read typedef.

typedef int Gj_Iface_flushFunc (Gj_Ctx* ctx, Gj_Iface* iface, Gj_IfacePort* port)
 IO function flush typedef.

typedef int Gj_Iface_listenFunc (Gj_Ctx* ctx, Gj_Iface* iface)
 IO function listen typedef. More...


Functions

Gj_IdGj_iface_getId (Gj_Iface* iface)
 Get the id of an interface. More...

int Gj_iface_listen (Gj_Ctx* ctx, Gj_Iface* iface)
 Listen on the given interface. More...

int gj_iface_serve (Gj_Ctx* ctx, Gj_IfaceIncomingConn* conn)
 The serving function. More...


Detailed Description

IO interface management.


Typedef Documentation

typedef int Gj_Iface_listenFunc(Gj_Ctx* ctx, Gj_Iface* iface)
 

IO function listen typedef.

Listen on the interface until an incoming connection request arrives, establish that connection and fork to gj_iface_serve. Should be running until ctx->session->abort is set.


Function Documentation

Gj_Id * Gj_iface_getId ( Gj_Iface * iface )
 

Get the id of an interface.

The returned id is STILL OWNED by the interface.

int Gj_iface_listen ( Gj_Ctx * ctx,
Gj_Iface * iface )
 

Listen on the given interface.

Returns:
0 on success, -1 otherwise.

int gj_iface_serve ( Gj_Ctx * ctx,
Gj_IfaceIncomingConn * conn )
 

The serving function.

For internal use only.


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