Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

mqueue Struct Reference

#include <mq.h>


Detailed Description

A message queue.

The queue itself is a two-way list, whose head is kept in `qhead' and the tail in `qtail', since a GList does not keep that information and we don't want to traverse the list each time. Manual bookkeeping required.

Flow control is triggered when the size reaches the high watermark, and remains in effect until we reach the low watermark, thereby providing the necessary hysteresis.

The `qlink' field is used during flow-control. It contains a sorted (by priority) array of all the items in the list. It is dynamically allocated and freed as needed.

The `header' is used to hold the function/hops/TTL of a reference message to be used as a comparison point when speeding up dropping in flow-control.


Data Fields

gnutella_header header
 Comparison point during flow control.

gnutella_nodenode
 Node to which this queue belongs.

const struct mq_opsops
 Polymorphic operations.

const struct mq_copscops
 Common operations.

txdrv_ttx_drv
 Network TX stack driver.

GList * qhead
 The queue head, new messages are prepended.

GList * qtail
 The queue tail, oldest message to send first.

GList ** qlink
 Sorted array of (GList *) entries, or NULL.

gpointer swift_ev
 Callout queue event in "swift" mode.

gint swift_elapsed
 Scheduled elapsed time, in ms.

gint qlink_count
 Amount of entries in `qlink'.

gint maxsize
 Maximum size of this queue (total queued).

gint count
 Amount of messages queued.

gint hiwat
 High watermark.

gint lowat
 Low watermark.

gint size
 Current amount of bytes queued.

gint flags
 Status flags.

gint last_written
 Amount last written by service routine.

gint flowc_written
 Amount written during flow control.

gint last_size
 Queue size at last "swift" event callback.


Field Documentation

const struct mq_cops* mqueue::cops
 

Common operations.

gint mqueue::count
 

Amount of messages queued.

gint mqueue::flags
 

Status flags.

gint mqueue::flowc_written
 

Amount written during flow control.

struct gnutella_header mqueue::header
 

Comparison point during flow control.

gint mqueue::hiwat
 

High watermark.

gint mqueue::last_size
 

Queue size at last "swift" event callback.

gint mqueue::last_written
 

Amount last written by service routine.

gint mqueue::lowat
 

Low watermark.

gint mqueue::maxsize
 

Maximum size of this queue (total queued).

struct gnutella_node* mqueue::node
 

Node to which this queue belongs.

const struct mq_ops* mqueue::ops
 

Polymorphic operations.

GList* mqueue::qhead
 

The queue head, new messages are prepended.

GList** mqueue::qlink
 

Sorted array of (GList *) entries, or NULL.

gint mqueue::qlink_count
 

Amount of entries in `qlink'.

GList* mqueue::qtail
 

The queue tail, oldest message to send first.

gint mqueue::size
 

Current amount of bytes queued.

gint mqueue::swift_elapsed
 

Scheduled elapsed time, in ms.

gpointer mqueue::swift_ev
 

Callout queue event in "swift" mode.

txdrv_t* mqueue::tx_drv
 

Network TX stack driver.


The documentation for this struct was generated from the following file:
Generated on Sun Feb 12 10:50:12 2006 for Gtk-Gnutella by doxygen 1.3.6