|
The Assimilation Monitoring Project
|
This is a basic NetIO class abstract class for doing network I/O. More...
#include <netio.h>

Public Member Functions | |
| gboolean | input_queued (const NetIO *self) |
| <[in] TRUE if input is queued ready to be read More... | |
| gboolean | bindaddr (NetIO *self, const NetAddr *, gboolean silent) |
| <[in] Bind this NetIO to the given address More... | |
| gboolean | mcastjoin (NetIO *self, const NetAddr *, const NetAddr *) |
| <Join multicast group More... | |
| gboolean | setmcast_ttl (NetIO *self, guint8 ttl) |
| < Set ipv4 multicast TTL More... | |
| gint | getfd (const NetIO *self) |
| <[in] Return file/socket descriptor More... | |
| void | setblockio (const NetIO *self, gboolean blocking) |
| <[in] Set blocking/non-blocking mode More... | |
| gsize | getmaxpktsize (const NetIO *self) |
| < Return maximum packet size for this NetIO More... | |
| gsize | setmaxpktsize (NetIO *, gsize) |
| < Set maximum packet size More... | |
| void | sendaframeset (NetIO *self, const NetAddr *dest, FrameSet *frameset) |
| < Send a FrameSet list to a NetIO class More... | |
| void | sendframesets (NetIO *self, const NetAddr *dest, GSList *framesets) |
| < Send a FrameSet list to a NetIO class More... | |
| GSList * | recvframesets (NetIO *, NetAddr **src) |
| < Receive a single datagram's framesets More... | |
| gboolean | sendareliablefs (NetIO *self, NetAddr *dest, guint16 queueid, FrameSet *frameset) |
| [out] source address of return result More... | |
| gboolean | sendreliablefs (NetIO *self, NetAddr *dest, guint16 queueid, GSList *fslist) |
| < Reliably send multiple FrameSets (if possible) More... | |
| gboolean | ackmessage (NetIO *self, NetAddr *dest, FrameSet *frameset) |
| < User-level ACK of a message sent reliably More... | |
| gboolean | supportsreliable (NetIO *self) |
| < return TRUE if this object supports reliable transport More... | |
| gboolean | outputpending (NetIO *self) |
| < return TRUE if this object has output pending More... | |
| void | closeconn (NetIO *self, guint16 qid, const NetAddr *destaddr) |
| < Flush packets in queues to this address More... | |
| SignFrame * | signframe (NetIO *self) |
| < return a copied SignFrame for use in sending More... | |
| Frame * | cryptframe (NetIO *self) |
| < return a copied encryption frame for sending More... | |
| Frame * | compressframe (NetIO *self) |
| < return a copied compression frame for sending More... | |
| void | setpktloss (NetIO *self, double rcv, double xmit) |
| < Set desired fraction of packet loss - TESTING ONLY! More... | |
| void | enablepktloss (NetIO *self, gboolean enable) |
| < enable packet loss (as set above) More... | |
Data Fields | |
| AssimObj | baseclass |
| NetIOstats | stats |
| Net I/O stats. More... | |
| GIOChannel * | giosock |
| Glib GIOChannel for this socket. More... | |
| gint | _maxpktsize |
| Maximum packet size for this transport. More... | |
| ConfigContext * | _configinfo |
| I/O and other configuration information. More... | |
| PacketDecoder * | _decoder |
| Decodes packets into FrameSets. More... | |
| SignFrame * | _signframe |
| Signature frame to use in signing FrameSets. More... | |
| Frame * | _cryptframe |
| Encryption frame to use in encrypting FrameSets. More... | |
| Frame * | _compressframe |
| Compression frame to use in compressing FrameSets. More... | |
| GHashTable * | aliases |
| IP address aliases for received packets. More... | |
| double | _rcvloss |
| private: Receive loss fraction More... | |
| double | _xmitloss |
| private: Transmit loss fraction More... | |
| gboolean | _shouldlosepkts |
| private: TRUE to enable packet loss... More... | |
| NetAddr *(* | boundaddr )(const NetIO *self) |
| [in] Object to return bound address/port of More... | |
| void(* | addalias )(NetIO *, NetAddr *, NetAddr *) |
| Add an alias to our received address alias table. More... | |
This is a basic NetIO class abstract class for doing network I/O.
It is an abstract class from which you must make subclasses, and is managed by our C-Class Management system.
< User-level ACK of a message sent reliably
| [in,out] | self | 'this' object pointer |
| [in] | dest | destination address |
| [in] | frameset | The FrameSet to ACK - note that it must have a sequence number. Good thing to remember that the client (that is you has to ACK packets or they won't get ACKed - which will totally ball things up... |
Referenced by netio_new(), and obey_pingpong().

<[in] Bind this NetIO to the given address
| [in,out] | self | Object to bind |
| [in] | silent | TRUE if no message on failure |
Referenced by main(), and netio_new().

< Flush packets in queues to this address
| self | 'this' object pointer |
| qid | Queue id for this connection |
| destaddr | Address we're flushing for |
Referenced by nanoobey_stopexpecthb(), and netio_new().

< return a copied compression frame for sending
| [in] | self | 'this' object |
Referenced by netio_new().

< return a copied encryption frame for sending
[in] 'this' object
Referenced by netio_new().

| void _NetIO::enablepktloss | ( | NetIO * | self, |
| gboolean | enable | ||
| ) |
< enable packet loss (as set above)
| [in,out] | self | 'this' object |
| enable | TRUE == enable, FALSE == disable |
Referenced by main(), and netio_new().

| gint _NetIO::getfd | ( | const NetIO * | self | ) |
<[in] Return file/socket descriptor
[in] 'this' Object
Referenced by netgsource_new(), and netio_new().

| gsize _NetIO::getmaxpktsize | ( | const NetIO * | self | ) |
< Return maximum packet size for this NetIO
'this' object
Referenced by netio_new().

| gboolean _NetIO::input_queued | ( | const NetIO * | self | ) |
<[in] TRUE if input is queued ready to be read
The Object to examine
Referenced by netio_new().

<Join multicast group
[in] local if addr or NULL
| [in,out] | self | Object to bind |
Referenced by main(), and netio_new().

| gboolean _NetIO::outputpending | ( | NetIO * | self | ) |
< return TRUE if this object has output pending
| [in,out] | self | 'this' object pointer |
Referenced by _nano_final_shutdown(), and netio_new().

< Receive a single datagram's framesets
<
Referenced by netio_new(), and reliableudp_new().

< Send a FrameSet list to a NetIO class
<
| [in,out] | self | 'this' object pointer |
| [in] | dest | destination address |
| [in] | frameset | FrameSet to send |
Referenced by _fsprotocol_xmitifwecan(), _netgsource_sendaframeset(), netio_new(), and reliableudp_new().

| gboolean _NetIO::sendareliablefs | ( | NetIO * | self, |
| NetAddr * | dest, | ||
| guint16 | queueid, | ||
| FrameSet * | frameset | ||
| ) |
[out] source address of return result
< Reliably send a single FrameSet (if possible) <
| [in,out] | self | 'this' object pointer |
| [in] | dest | destination address |
| [in] | queueid | The queue id to send it to |
| [in] | frameset | The FrameSet to send |
Referenced by _jsondiscovery_send(), _nano_send_rscexitstatus(), _switchdiscovery_dispatch(), fakecma_startup(), main(), nanoprobe_report_upstream(), and netio_new().

< Send a FrameSet list to a NetIO class
<
| [in,out] | self | 'this' object pointer |
| [in] | dest | destination address |
| [in] | framesets | List of FrameSets to send |
Referenced by _netgsource_sendframesets(), netio_new(), and reliableudp_new().

< Reliably send multiple FrameSets (if possible)
<
| [in,out] | self | 'this' object pointer |
| [in] | dest | destination address |
| [in] | queueid | The queue id to send it to |
| [in] | fslist | The list of FrameSets to send |
Referenced by netio_new(), and obey_pingpong().

| void _NetIO::setblockio | ( | const NetIO * | self, |
| gboolean | blocking | ||
| ) |
<[in] Set blocking/non-blocking mode
| [in,out] | self | 'this' Object. |
| [in] | blocking | TRUE if you want it to block |
Referenced by netgsource_new(), and netio_new().

| gsize _NetIO::setmaxpktsize | ( | NetIO * | , |
| gsize | |||
| ) |
< Set maximum packet size
size to set max pkt size to
Referenced by netio_new().

| gboolean _NetIO::setmcast_ttl | ( | NetIO * | self, |
| guint8 | ttl | ||
| ) |
< Set ipv4 multicast TTL
| [in,out] | self | Object to set mcast TTL for |
| [in] | ttl | Multicast TTL value |
Referenced by main(), and netio_new().

| void _NetIO::setpktloss | ( | NetIO * | self, |
| double | rcv, | ||
| double | xmit | ||
| ) |
< Set desired fraction of packet loss - TESTING ONLY!
| [in,out] | self | 'this' object |
| rcv | Packet receive loss fraction (0:1] | |
| xmit | Packet transmission loss (0:1] |
Referenced by main(), and netio_new().

< return a copied SignFrame for use in sending
[in]
Referenced by netio_new().

| gboolean _NetIO::supportsreliable | ( | NetIO * | self | ) |
< return TRUE if this object supports reliable transport
| [in,out] | self | 'this' object pointer |
Referenced by netio_new().

| Frame* _NetIO::_compressframe |
Compression frame to use in compressing FrameSets.
Definition at line 66 of file netio.h.
Referenced by netio_new().
| ConfigContext* _NetIO::_configinfo |
I/O and other configuration information.
Definition at line 62 of file netio.h.
Referenced by netio_new().
| Frame* _NetIO::_cryptframe |
Encryption frame to use in encrypting FrameSets.
Definition at line 65 of file netio.h.
Referenced by netio_new().
| PacketDecoder* _NetIO::_decoder |
| gint _NetIO::_maxpktsize |
Maximum packet size for this transport.
Definition at line 61 of file netio.h.
Referenced by netio_new().
| gboolean _NetIO::_shouldlosepkts |
| SignFrame* _NetIO::_signframe |
Signature frame to use in signing FrameSets.
Definition at line 64 of file netio.h.
Referenced by netio_new().
Add an alias to our received address alias table.
Definition at line 87 of file netio.h.
Referenced by nanoobey_setconfig(), and netio_new().
| GHashTable* _NetIO::aliases |
IP address aliases for received packets.
Definition at line 67 of file netio.h.
Referenced by netio_new().
| AssimObj _NetIO::baseclass |
Definition at line 58 of file netio.h.
Referenced by _nano_final_shutdown(), netio_new(), and reliableudp_new().
[in] Object to return bound address/port of
Definition at line 78 of file netio.h.
Referenced by main(), and netio_new().
| GIOChannel* _NetIO::giosock |
Glib GIOChannel for this socket.
Definition at line 60 of file netio.h.
Referenced by netioudp_new().
| NetIOstats _NetIO::stats |
Net I/O stats.
Definition at line 59 of file netio.h.
Referenced by nano_shutdown(), and netio_new().