Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tr-udp.h
Go to the documentation of this file.
1 
10 #ifndef NET_TR_UDP_H
11 #define NET_TR_UDP_H
12 
13 #include "trudp.h"
14 
15 #define make_addr(addr_str, port, addr, addr_len) trudpUdpMakeAddr(addr_str, port, addr, addr_len)
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 ssize_t ksnTRUDPrecvfrom(trudpData *td, int fd, void *buffer, size_t buffer_len,
22  int flags, __SOCKADDR_ARG addr, socklen_t *addr_len);
23 
24 ssize_t ksnTRUDPsendto(trudpData *td, int resend_fl, uint32_t id, int attempt,
25  int cmd, int fd, const void *buf, size_t buf_len, int flags,
26  __CONST_SOCKADDR_ARG addr, socklen_t addr_len);
27 
28 void trudp_event_cb(void *tcd_pointer, int event, void *data,
29  size_t data_length, void *user_data);
30 
31 #ifdef __cplusplus
32 }
33 #endif
34 
35 #endif /* NET_TR_UDP_H */
36 
const char data[]
Make it with: gcc -o post-callback post-callback.c -lcurl.
Definition: post-callback.c:23
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.
Definition: tr-udp.c:61
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.
Definition: tr-udp.c:113
void trudp_event_cb(void *tcd_pointer, int event, void *data, size_t data_length, void *user_data)
TR-UDP event callback.
Definition: tr-udp.c:258
int fd
Definition: teol0cli.c:22