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

gtcSpeaker Struct Reference

The basic communication object. More...

#include <gtcspeaker.h>

List of all members.

Public Attributes

int fd
 Socket of the speaker.

int dead
 If this is 1, the socket is dead and no IO will happen on it. If it's 0, it's ok.

gtcPacketListouthead
gtcPacketListouttail
gtcPacketListinhead
gtcPacketListintail
int rstate
int rpos
int wstate
int wpos
unsigned char rfoo [4]
gtcPacketr


Detailed Description

The basic communication object.

A speaker is the GTC interface to sockets. It performs basic sanity checking on the incoming data -- buffer overruns and such should not be a problem. (FIXME: a facility for limiting bandwidth and memory usage for the incoming queue needs to be added for this to be good). You can get a new speaker to connect using either gtc_connect_2_host() or gtc_connect_2_fd(). gtc_speaker_fds() will tell you which fd to select(3) on. If stuff has appeared on the input side of things, gtc_speaker_read() will read this data and put it in nice packets. On the other hand, gtc_speaker_write() will perform the necessary processing for sending packets. gtc_speaker_get() will read the next packet (returning 0 if there are no pending packets) while gtc_speaker_put will put a new packet in the outgoing queue.

Undocumented members (eg, outhead, outtail, inhead, intail, rstate, rpos, wstate, wpos, rfoo and r) are private and should never be thought about.


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