18 #ifndef KAA_TCP_CHANNEL_H_ 
   19 #define KAA_TCP_CHANNEL_H_ 
   21 #include "../kaa_error.h" 
   22 #include "../platform/ext_transport_channel.h" 
   23 #include "../platform/defaults.h" 
   24 #include "../platform/ext_tcp_utils.h" 
   75                                  , 
size_t supported_service_count);
 
  127                                           , uint16_t *max_timeout);
 
  169                                                 , uint16_t keepalive);
 
kaa_error_t kaa_tcp_channel_create(kaa_transport_channel_interface_t *self, kaa_logger_t *logger, kaa_service_t *supported_services, size_t supported_service_count)
Creates a Kaa TCP channel instance. 
 
Interface for a client transport channel implementation. 
 
kaa_error_t kaa_tcp_channel_process_event(kaa_transport_channel_interface_t *self, fd_event_t event_type)
Notifies the channel instance about the I/O event. 
 
kaa_service_t
Types of Kaa platform services. 
 
kaa_error_t kaa_tcp_channel_disconnect(kaa_transport_channel_interface_t *self)
Disconnects the current channel. 
 
struct kaa_logger_t kaa_logger_t
 
kaa_error_t kaa_tcp_channel_set_keepalive_timeout(kaa_transport_channel_interface_t *self, uint16_t keepalive)
Sets a keepalive timeout for the current channel. 
 
bool kaa_tcp_channel_is_ready(kaa_transport_channel_interface_t *self, fd_event_t event_type)
Checks whether the given channel instance is ready to handle the specified event. ...
 
kaa_error_t kaa_tcp_channel_check_keepalive(kaa_transport_channel_interface_t *self)
Checks whether a keepalive timeout occurred. If so, sends a keepalive message to the server...
 
kaa_error_t(* on_kaa_tcp_channel_event_fn)(void *context, kaa_tcp_channel_event_t event_type, kaa_fd_t fd)
Notifies about the current channel's state. Used by kaa_tcp_channel_set_socket_events_callback ...
 
kaa_error_t kaa_tcp_channel_get_max_timeout(kaa_transport_channel_interface_t *self, uint16_t *max_timeout)
Retrieves the maximum timeout for the multiplexing I/O like select/poll. Used for kaa_tcp_channel_che...
 
kaa_error_t kaa_tcp_channel_get_descriptor(kaa_transport_channel_interface_t *self, kaa_fd_t *fd_p)
Retrieves the socket descriptor from the given channel instance. 
 
kaa_error_t kaa_tcp_channel_set_socket_events_callback(kaa_transport_channel_interface_t *self, on_kaa_tcp_channel_event_fn callback, void *context)
Sets the callback for the current channel connection state.