Transformer SDK For C  6.2.11.309924
Managing Events

Typedefs

typedef struct _ds_io_event ds_except_event_t
 Opaque type defining an exception event. More...
 
typedef struct _ds_io_event ds_generic_event_t
 Opaque type defining a generic read/write event. More...
 
typedef int(* ds_io_event_cb) (sock_t sock, int val, void *data)
 Definition of the callback for use with read and write events. More...
 
typedef struct _ds_io_event ds_read_event_t
 Opaque type defining a read event. More...
 
typedef int(* ds_timed_event_cb) (int id, int val, void *data)
 Definition of the callback for use with timed events. More...
 
typedef struct _ds_timed_event ds_timed_event_t
 Opaque type defining a timed event. More...
 
typedef int(* ds_udp_event_cb) (int argc, char *argv[], int val, void *data)
 Definition of the callback for use with udp events. More...
 
typedef struct _ds_udp_event ds_udp_event_t
 Opaque type defining a udp event. More...
 
typedef struct _ds_io_event ds_write_event_t
 Opaque type defining a write event. More...
 
typedef void(* udpcmd_t) (int argc, char *argv[])
 Definition of the function type used for udp command callbacks. More...
 

Detailed Description

Typedef Documentation

typedef struct _ds_io_event ds_except_event_t

Opaque type defining an exception event.

typedef struct _ds_io_event ds_generic_event_t

Opaque type defining a generic read/write event.

typedef int(* ds_io_event_cb) (sock_t sock, int val, void *data)

Definition of the callback for use with read and write events.

Parameters
sockThe socket
valThe val argument given by ds_add_read_event()/ds_add_write_event() when adding this event
dataThe data argument given by ds_add_read_event()/ds_add_write_event() when adding this event
Return values
0- Event should be removed
1- Event should not be removed
typedef struct _ds_io_event ds_read_event_t

Opaque type defining a read event.

typedef int(* ds_timed_event_cb) (int id, int val, void *data)

Definition of the callback for use with timed events.

Parameters
idThe id argument given by ds_add_timed_event() when adding this event
valThe val argument given by ds_add_timed_event() when adding this event
dataThe data argument given by ds_add_timed_event() when adding this event
Return values
0- Event should be removed
1- Event should not be removed
typedef struct _ds_timed_event ds_timed_event_t

Opaque type defining a timed event.

typedef int(* ds_udp_event_cb) (int argc, char *argv[], int val, void *data)

Definition of the callback for use with udp events.

Parameters
argcNumber of arguments to this udp command
argvArguments, argv[0] is the name of the command
valThe val argument given by ds_add_udp_event() when adding this event
dataThe data argument given by ds_add_udp_event() when adding this event
Return values
0- Event should be removed
1- Event should not be removed
typedef struct _ds_udp_event ds_udp_event_t

Opaque type defining a udp event.

typedef struct _ds_io_event ds_write_event_t

Opaque type defining a write event.

typedef void(* udpcmd_t) (int argc, char *argv[])

Definition of the function type used for udp command callbacks.

Parameters
argcNumber of arguments
argvArray of arguments

The parameters to this function are in the classical C style as used by the main() function.

In a similar manner argv[0] is always the udp command that has been requested.

It should be noted that the callback does not have to clear up argv - this is done by the calling mechanism.

Deprecated:
This callback type is maintained for compatibility reasons
See also
ds_udp_event_cb

Generated on Sat Aug 26 2017 12:36:32 for Transformer SDK For C