The Assimilation Project  based on Assimilation version
Go to the documentation of this file.
26 #ifndef _LISTENER_H
27 #define _LISTENER_H
28 #include <projectcommon.h>
29 #include <assimobj.h>
30 #include <netaddr.h>
31 #include <frameset.h>
32 #include <configcontext.h>
33 typedef struct _Listener Listener;
34 #include <netgsource.h>
38 //typedef struct _Listener Listener;
41 struct _Listener {
45  gboolean (*got_frameset)(Listener* self,
46  FrameSet* fs,
47  NetAddr* na
48  );
49  void (*associate) (Listener* self,
50  NetGSource* source);
51  void (*dissociate) (Listener* self);
52 };
54 WINEXPORT Listener* listener_new(ConfigContext* config, gsize listen_objsize);
57 #endif
61 #endif /* _LISTENER_H */
WINEXPORT Listener * listener_new(ConfigContext *config, gsize listen_objsize)
Construct a new Listener - setting up GSource and timeout data structures for it. ...
Definition: listener.c:82
gboolean(* got_frameset)(Listener *self, FrameSet *fs, NetAddr *na)
called when a FrameSet arrives
Definition: listener.h:45
Implements minimal client-oriented Frame and Frameset capabilities.
void(* dissociate)(Listener *self)
Dissociate us from our source.
Definition: listener.h:51
Definition: projectcommon.h:45
This file defines our base object class: AssimObj.
Project common header file.
NetGSource * transport
Definition: listener.h:44
void(* associate)(Listener *self, NetGSource *source)
NetGSource class to associate with
Definition: listener.h:49
Implements Configuration Context class.
ConfigContext * config
Definition: listener.h:43
The NetAddr class class represents a general network address - whether IP, MAC, or any other type of ...
Definition: netaddr.h:43
Defines interfaces for the NetAddr (network address) object.
FrameSet class - used for collecting Frames when not on the wire, and for marshalling/demarshalling t...
Definition: frameset.h:46
Implements NetIO GSource object.
AssimObj baseclass
Definition: listener.h:42
The NetGSource class objects integrate NetIO class objects into the g_main_loop paradigm.
Definition: netgsource.h:43
This is the Listener class. object - which generically listens for packets.
Definition: listener.h:41
void _listener_finalize(AssimObj *self)
Finalize a Listener.
Definition: listener.c:53