The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
netgsource.c File Reference

Implements NetIO GSource (NetGSource) object. More...

#include <projectcommon.h>
#include <memory.h>
#include <glib.h>
#include <frameset.h>
#include <netgsource.h>
Include dependency graph for netgsource.c:

Go to the source code of this file.


#define __FUNCTION__   "_netgsource_finalize"


FSTATIC gboolean _netgsource_prepare (GSource *source,gint *timeout)
 GSource prepare routine for NetGSource - always returns TRUE Called before going into the select/poll call - to get things ready for the poll call. More...
FSTATIC gboolean _netgsource_check (GSource *gself)
 GSource check routine for NetGSource. More...
FSTATIC gboolean _netgsource_dispatch (GSource *gself,GSourceFunc ignore_callback,gpointer ignore_userdata)
 GSource dispatch routine for NetGSource. More...
FSTATIC void _netgsource_finalize (GSource *gself)
 Finalize (free) the NetGSource object. More...
FSTATIC void _netgsource_addListener (NetGSource *, guint16, Listener *)
FSTATIC void _netgsource_del_listener (gpointer)
FSTATIC void _netgsource_sendaframeset (NetGSource *self,const NetAddr *addr,FrameSet *fs)
 Send a single frameset to the given address. More...
FSTATIC void _netgsource_sendframesets (NetGSource *self,const NetAddr *addr,GSList *fslist)
 Send a (GSList) list of FrameSets to the given address. More...
NetGSourcenetgsource_new (NetIO *iosrc, GDestroyNotify notify, gint priority, gboolean can_recurse, GMainContext *context, gsize objsize, gpointer userdata)
 Create a new (abstract) NetGSource object. More...

Detailed Description

Implements NetIO GSource (NetGSource) object.

This file contains source code implementing NetGSource objects. NetGSource objects construct GSource objects from NetIO objects, so that input from NetIO objects can be incorporated into the Glib g_main_loop event-driven programming paradigm as a GSource derived class. As a result, functions can be dispatched when NetIO packets arrive.

This file is part of the Assimilation Project.

Copyright © 2011, 2012 - Alan Robertson
The Assimilation software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see

Definition in file netgsource.c.

Macro Definition Documentation

#define __FUNCTION__   "_netgsource_finalize"

Referenced by _authlistener_got_frameset(), _childprocess_childexit(), _childprocess_finalize(), _childprocess_timeout(), _compressframe_setvalue(), _compressframe_updatedata(), _discovery_sendjson(), _frame_default_finalize(), _frameset_getseqno(), _fsprotocol_ackseqno(), _fsprotocol_addconn(), _fsprotocol_closeall(), _fsprotocol_fsa(), _fsprotocol_fspe_reinit(), _fsprotocol_protoelem_destroy(), _fsprotocol_receive(), _fsprotocol_send(), _fsprotocol_send1(), _fsprotocol_timeoutfun(), _fsprotocol_xmitifwecan(), _fsqueue_ackthrough(), _fsqueue_enq(), _fsqueue_finalize(), _fsqueue_flush(), _fsqueue_inqsorted(), _hblistener_finalize(), _ipportframe_default_isvalid(), _jsondiscovery_discover(), _nano_final_shutdown(), _nano_initconfig_OK(), _netaddr_equal(), _netaddr_hash(), _netaddr_ipv6sockaddr(), _netaddr_string_ipv6_new(), _netgsource_dispatch(), _netgsource_finalize(), _reliableudp_finalize(), _reliableudp_input_queued(), _resource_queue_cmd_append(), _resource_queue_endnotify(), _resource_queue_qelem_finalize(), _resource_queue_qelem_new(), _resource_queue_runqueue(), _resourcecmd_execute(), _resourcelsb_child_notify(), _resourcelsb_execute(), _resourcelsb_finalize(), _resourcelsb_metadata(), _resourcelsb_validate_all(), _resourceocf_child_notify(), _resourceocf_execute(), _resourceocf_finalize(), _resourceocf_init_environ(), assimobj_new(), childprocess_new(), compressframe_new(), create_pid_file(), create_setconfig(), cstringframe_new(), daemonize_me(), frame_default_valuefinalize(), frame_new(), fsprotocol_new(), generic_childprocess_test(), gmainfd_gsource_check(), gmainfd_new(), gotnetpkt(), jsondiscovery_new(), nano_reqconfig(), nano_schedule_discovery(), nanoobey_cancelrscoperation(), nanoobey_dorscoperation(), nanoobey_expecthb(), nanoobey_sendhb(), nanoobey_setconfig(), nanoobey_startdiscover(), nanoprobe_report_upstream(), netaddr_dns_new(), obey_pingpong(), resourcecmd_constructor(), resourcecmd_new(), resourcelsb_new(), resourceocf_new(), shutdown_when_outdone(), test_log_command_output(), test_safe_ocfops(), test_safe_queue_lsbops(), and test_safe_queue_ocfops().