lwes_emitter.h File Reference


Detailed Description

Functions for emitting LWES events.

Go to the source code of this file.

Data Structures

struct  lwes_emitter
 Emits LWES events. More...

Functions

lwes_emitterlwes_emitter_create (LWES_CONST_SHORT_STRING address, LWES_CONST_SHORT_STRING iface, LWES_U_INT_32 port, LWES_BOOLEAN emit_heartbeat, LWES_INT_16 freq)
 Create an Emitter.
lwes_emitterlwes_emitter_create_with_ttl (LWES_CONST_SHORT_STRING address, LWES_CONST_SHORT_STRING iface, LWES_U_INT_32 port, LWES_BOOLEAN emit_heartbeat, LWES_INT_16 freq, LWES_U_INT_32 ttl)
 Create an Emitter with a TTL.
int lwes_emitter_emit (struct lwes_emitter *emitter, struct lwes_event *event)
 Emit an event to the multicast channel defined in the emitter.
int lwes_emitter_emitto (LWES_SHORT_STRING address, LWES_SHORT_STRING iface, LWES_U_INT_32 port, struct lwes_emitter *emitter, struct lwes_event *event)
 Emit an event to a different multicast channel.
int lwes_emitter_emit_bytes (struct lwes_emitter *emitter, LWES_BYTE_P bytes, size_t length)
 Emit bytes to a multicast channel.
int lwes_emitter_destroy (struct lwes_emitter *emitter)
 Destroy an Emitter.


Function Documentation

struct lwes_emitter* lwes_emitter_create LWES_CONST_SHORT_STRING  address,
LWES_CONST_SHORT_STRING  iface,
LWES_U_INT_32  port,
LWES_BOOLEAN  emit_heartbeat,
LWES_INT_16  freq
 

Create an Emitter.

Parameters:
[in] address The multicast ip address as a dotted quad string of the channel to emit to.
[in] iface The dotted quad ip address of the interface to send messages on, can be NULL to use default.
[in] port The port of the channel to emit to.
[in] emit_heartbeat Set to 1 to emit heartbeats, set to 0 to not emit heartbeats.
[in] freq Number of seconds between heartbeats.
See also:
lwes_emitter_destroy
Returns:
A newly created emitter, use lwes_emitter_destroy to free

struct lwes_emitter* lwes_emitter_create_with_ttl LWES_CONST_SHORT_STRING  address,
LWES_CONST_SHORT_STRING  iface,
LWES_U_INT_32  port,
LWES_BOOLEAN  emit_heartbeat,
LWES_INT_16  freq,
LWES_U_INT_32  ttl
 

Create an Emitter with a TTL.

Parameters:
[in] address The multicast ip address as a dotted quad string of the channel to emit to.
[in] iface The dotted quad ip address of the interface to send messages on, can be NULL to use default.
[in] port The port of the channel to emit to.
[in] emit_heartbeat Set to 1 to emit heartbeats, set to 0 to not emit heartbeats.
[in] freq Number of seconds between heartbeats.
[in] ttl The ttl to use for emitted events
See also:
lwes_emitter_destroy
Returns:
A newly created emitter, use lwes_emitter_destroy to free

int lwes_emitter_emit struct lwes_emitter emitter,
struct lwes_event event
 

Emit an event to the multicast channel defined in the emitter.

Parameters:
[in] emitter The emitter to emit to
[in] event The event to emit
Returns:
0 on success, a negative number on failure

int lwes_emitter_emitto LWES_SHORT_STRING  address,
LWES_SHORT_STRING  iface,
LWES_U_INT_32  port,
struct lwes_emitter emitter,
struct lwes_event event
 

Emit an event to a different multicast channel.

Parameters:
[in] address The multicast ip address as a dotted quad string of the channel to emit to.
[in] iface The dotted quad ip address of the interface to send messages on, can be NULL to use default.
[in] port The port of the channel to emit to.
[in] emitter The emitter to use for holding the send buffer
[in] event The event to emit
Returns:
0 on success, a negative number on failure

int lwes_emitter_emit_bytes struct lwes_emitter emitter,
LWES_BYTE_P  bytes,
size_t  length
 

Emit bytes to a multicast channel.

Use this in re-emitter's so that you don't have to deserialize and reserialize, NOTE: this will not result in statistics being incremented

Parameters:
[in] emitter The emitter to emit to
[in] bytes The bytes to emit
[in] length The number of bytes to emit
Returns:
the number of bytes sent on success, a negative number on failure

int lwes_emitter_destroy struct lwes_emitter emitter  ) 
 

Destroy an Emitter.

Parameters:
[in] emitter The emitter to destroy by freeing all of it's used memory.
Returns:
0 on success, negative number on failure


Generated on Thu Aug 21 07:18:55 2008 for lwes by  doxygen 1.4.6