Teonet library
0.4.7
|
#include "trudp.h"
Go to the source code of this file.
Macros | |
#define | make_addr(addr_str, port, addr, addr_len) trudpUdpMakeAddr(addr_str, port, addr, addr_len) |
File: tr-udp.h Author: Kirill Scherba kiril l@sc herba .ruMore... | |
Functions | |
ssize_t | ksnTRUDPrecvfrom (trudpData *td, int fd, void *buffer, size_t buffer_len, int flags, __SOCKADDR_ARG addr, socklen_t *addr_len) |
Get data from peer through TR-UDP transport. More... | |
ssize_t | ksnTRUDPsendto (trudpData *td, int resend_fl, uint32_t id, int attempt, int cmd, int fd, const void *buf, size_t buf_len, int flags, __CONST_SOCKADDR_ARG addr, socklen_t addr_len) |
Send to peer through TR-UDP transport. More... | |
void | trudp_event_cb (void *tcd_pointer, int event, void *data, size_t data_length, void *user_data) |
TR-UDP event callback. More... | |
#define make_addr | ( | addr_str, | |
port, | |||
addr, | |||
addr_len | |||
) | trudpUdpMakeAddr(addr_str, port, addr, addr_len) |
File: tr-udp.h Author: Kirill Scherba kiril l@sc herba .ru
Teonet Real time communications over UDP protocol (TR-UDP)
Created on August 4, 2015, 12:16 AM
Referenced by _cmd_tcpp_read_cb(), event_cb(), ksnCoreSendto(), and teo_recvfrom().
ssize_t ksnTRUDPrecvfrom | ( | trudpData * | td, |
int | fd, | ||
void * | buffer, | ||
size_t | buffer_len, | ||
int | flags, | ||
__SOCKADDR_ARG | addr, | ||
socklen_t * | addr_len | ||
) |
Get data from peer through TR-UDP transport.
td | |
fd | |
buffer | |
buffer_len | |
flags | |
addr | |
addr_len |
ssize_t ksnTRUDPsendto | ( | trudpData * | td, |
int | resend_flg, | ||
uint32_t | id, | ||
int | attempt, | ||
int | cmd, | ||
int | fd, | ||
const void * | buf, | ||
size_t | buf_len, | ||
int | flags, | ||
__CONST_SOCKADDR_ARG | addr, | ||
socklen_t | addr_len | ||
) |
Send to peer through TR-UDP transport.
td | Pointer to trudpData object |
resend_flg | New message or resend sent before (0 - new, 1 -resend) |
id | ID of resend message |
cmd | Command to allow TR-UDP |
attempt | Number of attempt of this message |
fd | File descriptor of UDP connection |
buf | Buffer with data |
buf_len | Data length |
flags | Flags (always 0, reserved) |
addr | Peer address |
addr_len | Peer address length |
References addr_port::addr, addr_port_free(), CMD_TRUDP_CHECK, DEBUG_VV, DEBUG_VVV, kev, ksn_printf, MODULE, addr_port::port, and wrap_inet_ntop().
Referenced by ksnLNullPacketSend().
void trudp_event_cb | ( | void * | tcd_pointer, |
int | event, | ||
void * | data, | ||
size_t | data_length, | ||
void * | user_data | ||
) |
TR-UDP event callback.
tcd_pointer | |
event | |
data | |
data_length | |
user_data |
References _ANSI_NONE, _ANSI_RED, DEBUG_VV, kev, ksn_printf, ksn_puts, ksnCoreProcessPacket(), ksnLNullClientDisconnect(), MODULE, remove_peer_addr(), teo_sendto(), trudp_process_receive(), and trudp_send_event_ack_to_app().
Referenced by ksnCoreInit().