GATE
C/C++ Framework
Loading...
Searching...
No Matches
gate_dataqueue_t Interface Reference

A data exchange communication queue to send and receive bytes with multiple remote peers. More...

#include <queues.h>

Inheritance diagram for gate_dataqueue_t:
gate_startable_t gate_object_t

Public Member Functions

gate_result_t set_callback (gate_dataqueue_status_t callback_func, void *callback_data)
 Sets a callback function that is called on each connection activity.
gate_result_t open (gate_string_t const *address, gate_uint32_t flags, void *user_param, gate_channel_id_t *channel_id)
 Opens a new connection to a remote peer for data communication as a communication channel.
gate_result_t close (gate_channel_id_t channel_id)
 Closes a communication channel.
gate_result_t begin_read (gate_channel_id_t channel_id, gate_size_t size, void *user_param)
 Starts a new read attempt on a channel.
gate_result_t begin_write (gate_channel_id_t channel_id, char const *buffer, gate_size_t buffer_size, void *user_param)
 Starts a new write attempt on a channel.
Public Member Functions inherited from gate_startable_t
gate_result_t start ()
 Starts an operation.
gate_result_t stop ()
 Stops a running operation.
gate_enumint_t get_status ()
 Retrieves a status indicator about the started or stopped operation.
Public Member Functions inherited from gate_object_t
char const * get_interface_name ()
 Returns on object's interface path name.
void release ()
 Decrease object's reference counter, releases the object when count reaches zero.
int retain ()
 Increase object's reference counter.

Detailed Description

A data exchange communication queue to send and receive bytes with multiple remote peers.

Member Function Documentation

◆ set_callback()

gate_result_t set_callback ( gate_dataqueue_status_t callback_func,
void * callback_data )

Sets a callback function that is called on each connection activity.

Parameters
[in]callback_funcfunction pointer to callback method that receives activity notifications
[in]callback_dataunique address to be interpreted by implementation
Returns
GATE_RESULT_* result code

◆ open()

gate_result_t open ( gate_string_t const * address,
gate_uint32_t flags,
void * user_param,
gate_channel_id_t * channel_id )

Opens a new connection to a remote peer for data communication as a communication channel.

Parameters
[in]addressaddress of remote peer to be connected
[in]flagsconnection related configuration flags
[in]user_paramper-connection user data to be returned in callback
[out]channel_idpointer to channel_id, to be filled with ID to opened connected
Returns
GATE_RESULT_* result code

◆ close()

gate_result_t close ( gate_channel_id_t channel_id)

Closes a communication channel.

Parameters
[in]channel_idcommunication channel ID to be closed
Returns
GATE_RESULT_* result code

◆ begin_read()

gate_result_t begin_read ( gate_channel_id_t channel_id,
gate_size_t size,
void * user_param )

Starts a new read attempt on a channel.

Parameters
[in]channel_idcommunication channel ID to be accessed
[in]sizemaximum amount of bytes to be read
[in]user_paramper-request user parameter to be returned in callback
Returns
GATE_RESULT_* result code

◆ begin_write()

gate_result_t begin_write ( gate_channel_id_t channel_id,
char const * buffer,
gate_size_t buffer_size,
void * user_param )

Starts a new write attempt on a channel.

Parameters
[in]channel_idcommunication channel ID to be accessed
[in]buffermaximum amount of bytes to be read
[in]buffer_sizemaximum amount of bytes to be read
[in]user_paramper-request user parameter to be returned in callback
Returns
GATE_RESULT_* result code

The documentation for this interface was generated from the following file: