Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

_gtcHost Struct Reference

A simple host. More...

#include <gtcspeaker.h>

List of all members.

Public Attributes

gtcSpeakerNodefirst
 first and last point to the head and tail of the speaker list.

gtcSpeakerNodelast
 first and last point to the head and tail of the speaker list.

int lfd
 The listen filedescriptor, for getting new clients.

int bigfds
 Biggest filedescriptor used, valid after gtc_host_process(). Use for select(3).

int verbose
 Verbosity level (0, 1, 2 or 3).

void* userdata
 You can set this to whatever you want (but careful, gtcmetagfx.h uses it).

void (* addcb )(gtcHost *h, gtcSpeakerNode *s)
 This function gets called when a new client connects.

void (* delcb )(gtcHost *h, gtcSpeakerNode *s)
 This function gets called when a client dies.


Detailed Description

A simple host.

Deprecated.

If you want to have some sort of server, this is where it happens. The host holds a list of gtcSpeaker (wrapped in gtcSpeakerNode). In addition, callbacks (addcb and delcb) can be registered (by making the pointers in the Host point to legitimate functions). addcb gets called whenever a new client connects. delcb gets called when a client is being removed for any reason. A void *userdata is also available for, well, user data.


The documentation for this struct was generated from the following file:
Generated at Sat Jul 14 18:53:52 2001 for GTC by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001