The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ReliableUDP class

A ReliableUDP object implements a protocol to make UDP reliable. More...

Collaboration diagram for ReliableUDP class:

Functions

FSTATIC gboolean _reliableudp_sendareliablefs (NetIO *nself, NetAddr *dest, guint16 qid, FrameSet *fs)
 Send a single packet reliably. More...
 
FSTATIC gboolean _reliableudp_sendreliablefs (NetIO *nself, NetAddr *dest, guint16 qid, GSList *fslist)
 Send several packets reliably. More...
 
FSTATIC gboolean _reliableudp_ackmessage (NetIO *nself, NetAddr *dest, FrameSet *frameset)
 Send an ACK (as requested) for for the packet we've been handed. More...
 
FSTATIC void _reliableudp_closeconn (NetIO *nself, guint16 qid, const NetAddr *dest)
 Close a reliable UDP connection (reset it, really) More...
 
FSTATIC void _reliableudp_log_conn (ReliableUDP *self, guint16 qid, NetAddr *destaddr)
 Dump connection information. More...
 
FSTATIC void _reliableudp_finalize (AssimObj *obj)
 Finalize (free up) our ReliableUDP class object. More...
 
FSTATIC gboolean _reliableudp_input_queued (const NetIO *nself)
 Return TRUE if we have input to read from someone... More...
 
FSTATIC void _reliableudp_sendaframeset (NetIO *nself, const NetAddr *dest, FrameSet *fs)
 Reliable UDP verison of 'sendaframeset' from base class. More...
 
FSTATIC void _reliableudp_sendframesets (NetIO *nself, const NetAddr *dest, GSList *fslist)
 Reliable UDP verison of 'sendframesets' from base class. More...
 
FSTATIC GSList * _reliableudp_recvframesets (NetIO *nself, NetAddr **srcaddr)
 Reliable UDP verison of 'recvframesets' from base class We get called when the user thinks he might have some packets to receive. More...
 
FSTATIC gboolean _reliableudp_supportsreliable (NetIO *self)
 Just return TRUE - we support reliable transport. More...
 
FSTATIC gboolean _reliableudp_outputpending (NetIO *nself)
 Return TRUE if any (reliable) output is pending. More...
 
ReliableUDPreliableudp_new (gsize objsize, ConfigContext *config, PacketDecoder *decoder, guint rexmit_timer_uS)
 Construct new UDP NetIO object (and its socket, etc) More...
 
typedef struct _ReliableUDP ReliableUDP
 

Detailed Description

A ReliableUDP object implements a protocol to make UDP reliable.

It is a class from which we might eventually make subclasses and is managed by our C-Class Management system. It takes great advantage of all the FsProtocol class class - which does much of the work.

Typedef Documentation

typedef struct _ReliableUDP ReliableUDP

Definition at line 39 of file reliableudp.h.

Function Documentation

FSTATIC gboolean _reliableudp_ackmessage ( NetIO self,
NetAddr dest,
FrameSet frameset 
)

Send an ACK (as requested) for for the packet we've been handed.

Definition at line 219 of file reliableudp.c.

References _FrameSet::baseclass, CASTTOCLASS, and DUMP3.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC void _reliableudp_closeconn ( NetIO self,
guint16  qid,
const NetAddr dest 
)

Close a reliable UDP connection (reset it, really)

Definition at line 230 of file reliableudp.c.

References _NetAddr::baseclass, CASTTOCLASS, and DUMP2.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC void _reliableudp_finalize ( AssimObj obj)

Finalize (free up) our ReliableUDP class object.

Definition at line 113 of file reliableudp.c.

References __FUNCTION__, CASTTOCLASS, DUMP2, and UNREF.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC gboolean _reliableudp_input_queued ( const NetIO nself)

Return TRUE if we have input to read from someone...

Definition at line 128 of file reliableudp.c.

References __FUNCTION__, CASTTOCONSTCLASS, and DEBUGMSG5.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC void _reliableudp_log_conn ( ReliableUDP self,
guint16  qid,
NetAddr destaddr 
)

Dump connection information.

Definition at line 253 of file reliableudp.c.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC gboolean _reliableudp_outputpending ( NetIO nself)

Return TRUE if any (reliable) output is pending.

Definition at line 245 of file reliableudp.c.

References CASTTOCLASS.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC GSList * _reliableudp_recvframesets ( NetIO nself,
NetAddr **  srcaddr 
)

Reliable UDP verison of 'recvframesets' from base class We get called when the user thinks he might have some packets to receive.

We intervene here, and queue them up, making sure they arrive in order and so on. ACKing the packets remains the responsibility of our client.

Definition at line 159 of file reliableudp.c.

References CASTTOCLASS, _FsProtocol::iready, _FsProtocol::read, _FsProtocol::receive, and UNREF.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC void _reliableudp_sendaframeset ( NetIO nself,
const NetAddr dest,
FrameSet fs 
)

Reliable UDP verison of 'sendaframeset' from base class.

Todo:
Should we prohibit sending packets during shutdown?

Definition at line 141 of file reliableudp.c.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC gboolean _reliableudp_sendareliablefs ( NetIO self,
NetAddr dest,
guint16  qid,
FrameSet fs 
)

Send a single packet reliably.

Definition at line 201 of file reliableudp.c.

References CASTTOCLASS.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC void _reliableudp_sendframesets ( NetIO nself,
const NetAddr dest,
GSList *  fslist 
)

Reliable UDP verison of 'sendframesets' from base class.

Todo:
Should we prohibit sending packets during shutdown?

Definition at line 149 of file reliableudp.c.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC gboolean _reliableudp_sendreliablefs ( NetIO self,
NetAddr dest,
guint16  qid,
GSList *  fslist 
)

Send several packets reliably.

Definition at line 210 of file reliableudp.c.

References CASTTOCLASS, and DEBUGMSG3.

Referenced by reliableudp_new().

Here is the caller graph for this function:

FSTATIC gboolean _reliableudp_supportsreliable ( NetIO self)

Just return TRUE - we support reliable transport.

Definition at line 238 of file reliableudp.c.

Referenced by reliableudp_new().

Here is the caller graph for this function:

ReliableUDP* reliableudp_new ( gsize  objsize,
ConfigContext config,
PacketDecoder decoder,
guint  rexmit_timer_uS 
)

Construct new UDP NetIO object (and its socket, etc)

Parameters
[in]objsizeSize of NetIOudp object, or zero.
[in,out]configconfig info
[in,out]decoderpacket decoder
[in]rexmit_timer_uSHow often to check for retransmission?

Definition at line 69 of file reliableudp.c.

References _AssimObj::_finalize, _reliableudp_ackmessage(), _reliableudp_closeconn(), _reliableudp_finalize(), _reliableudp_input_queued(), _reliableudp_log_conn(), _reliableudp_outputpending(), _reliableudp_recvframesets(), _reliableudp_sendaframeset(), _reliableudp_sendareliablefs(), _reliableudp_sendframesets(), _reliableudp_sendreliablefs(), _reliableudp_supportsreliable(), _NetIOudp::baseclass, _NetIO::baseclass, BINDDEBUG, fsprotocol_new(), netioudp_new(), NEWSUBCLASS, _NetIO::recvframesets(), _NetIO::sendaframeset(), and _NetIO::sendframesets().

Referenced by cma.AssimCclasses.pyReliableUDP::__init__(), and main().

Here is the call graph for this function:

Here is the caller graph for this function: