16 #include "teonet_l0_client.h"
74 size_t cname_length, uint8_t cmd,
void *
data,
size_t data_len);
76 size_t cname_length,
void *data,
size_t data_len);
78 size_t cname_length,
void *data,
size_t data_len);
ksnLNullClass * ksnLNullInit(void *ke)
Initialize ksnLNull module class.
Definition: l0-server.c:96
uint16_t data_length
Packet data length.
Definition: l0-server.h:61
teoLNullEncryptionContext * ksnLNullClientGetCrypto(ksnLNullClass *kl, int fd)
Returns L0 client encryption context and return it if available.
Definition: l0-server.c:2081
int ksnLNullSendEchoToL0A(void *ke, char *addr, int port, char *cname, size_t cname_length, void *data, size_t data_len)
Definition: l0-server.c:523
const char data[]
Make it with: gcc -o post-callback post-callback.c -lcurl.
Definition: post-callback.c:23
char * name
Clients name.
Definition: l0-server.h:24
uint8_t client_name_length
Client name length (includes null terminated)
Definition: l0-server.h:60
int fd
L0 TCP Server FD.
Definition: l0-server.h:45
void ksnLNullClientDisconnect(ksnLNullClass *kl, int fd, int remove_f)
Disconnect l0 Server client.
Definition: l0-server.c:1037
struct ksnLNullSPacket ksnLNullSPacket
L0 Server resend to peer packet data structure.
size_t read_buffer_ptr
Pointer in read buffer.
Definition: l0-server.h:27
PblMap * map_n
Pointer to the L0 FDs map (by name)
Definition: l0-server.h:44
int ksnLNullClientIsConnected(ksnLNullClass *kl, char *client_name)
Check if L0 client is connected and return it FD.
Definition: l0-server.c:1347
teonet_client_data_ar * ksnLNullClientsList(ksnLNullClass *kl)
Create list of clients.
Definition: l0-server.c:1684
struct ksnLNullClass ksnLNullClass
ksnLNull Class structure definition
ksnCQue Class structure definition
Definition: cque.h:18
int ksnLNullSendEchoToL0(void *ke, char *addr, int port, char *cname, size_t cname_length, void *data, size_t data_len)
Send echo to L0 client.
Definition: l0-server.c:510
KSNet core received data structure.
Definition: net_com.h:107
struct ksnLNullData ksnLNullData
File: l0-server.h Author: Kirill Scherba kirill@scherba.ru
size_t read_buffer_size
Read buffer size.
Definition: l0-server.h:28
int t_channel
TR-UDP channel.
Definition: l0-server.h:32
double last_time
Definition: l0-server.h:33
File: l0-server.h Author: Kirill Scherba kirill@scherba.ru
Definition: l0-server.h:22
ssize_t ksnLNullPacketSend(ksnLNullClass *kl, int fd, void *pkg, size_t pkg_length)
Send packet to L0 client.
Definition: l0-server.c:923
char payload[]
Сlient name (includes null terminated) + packet data.
Definition: l0-server.h:62
void * read_buffer
Pointer to saved buffer.
Definition: l0-server.h:26
int t_port
TR-UDP port.
Definition: l0-server.h:31
uint8_t cmd
Command number.
Definition: l0-server.h:59
size_t ksnLNullClientsListLength(teonet_client_data_ar *clients_data)
Return size of teonet_client_data_ar data.
Definition: l0-server.c:1723
L0 Server resend to peer packet data structure.
Definition: l0-server.h:58
int fd_trudp
Last free TR-UDP L0 FD.
Definition: l0-server.h:47
ksnCQueClass * cque
CQUe to check dead clients.
Definition: l0-server.h:48
char * t_addr
TR-UDP IP address.
Definition: l0-server.h:30
void ksnLNullDestroy(ksnLNullClass *kl)
Destroy ksnLNull module class.
Definition: l0-server.c:149
int ksnLNulltrudpCheckPaket(ksnLNullClass *kl, ksnCorePacketData *rd)
Check and process L0 packet received through TR-UDP.
Definition: l0-server.c:2021
ksnLNullSStat stat
L0 server statistic.
Definition: l0-server.h:46
ksnLNull Class structure definition
Definition: l0-server.h:41
ev_io w
TCP Client watcher.
Definition: l0-server.h:23
size_t name_length
Clients name length.
Definition: l0-server.h:25
int ksnLNullSendToL0(void *ke, char *addr, int port, char *cname, size_t cname_length, uint8_t cmd, void *data, size_t data_len)
Send data to L0 client.
Definition: l0-server.c:466
void * ke
Pointer to ksnEvMgrClass.
Definition: l0-server.h:42
PblMap * map
Pointer to the L0 clients map (by fd)
Definition: l0-server.h:43
int fd
Definition: teol0cli.c:22
teoLNullEncryptionContext * server_crypt
Definition: l0-server.h:35
ksnLNullSStat * ksnLNullStat(ksnLNullClass *kl)
Get L0 server statistic.
Definition: l0-server.c:367