char data[]
Stream data: stream_name + stream data.
Definition: stream.h:72
Create stream command.
Definition: stream.h:55
int pipe_out[2]
Output (write) pipe.
Definition: stream.h:28
int ksnStreamCreate(ksnStreamClass *ks, char *to_peer, char *stream_name, int send_f)
Create new named stream with selected peer.
Definition: stream.c:136
int fd_in
Definition: stream.h:44
int created
Created flag.
Definition: stream.h:25
Stream created (answer to create) command.
Definition: stream.h:57
File: stream.h Author: Kirill Scherba kirill@scherba.ru
Definition: stream.h:23
uint8_t cmd
Stream subcommand.
Definition: stream.h:69
Stream module class structure.
Definition: stream.h:78
const char * stream_name
Definition: stream.h:42
struct ksnStreamData ksnStreamData
Stream map data structure.
stream_cmd
Stream subcommands.
Definition: stream.h:52
struct ksnStreamMapData ksnStreamMapData
File: stream.h Author: Kirill Scherba kirill@scherba.ru
int ksnStreamClose(ksnStreamClass *ks, char *to_peer, char *stream_name, int send_f)
Close named stream with selected peer.
Definition: stream.c:244
void * ke
Pointer to ksnetEvMgrClass.
Definition: stream.h:80
ev_io w_in
Input stream watcher.
Definition: stream.h:27
ksnStreamData * ksnStreamGetDataFromMap(ksnStreamData *sd, ksnStreamMapData *smd)
Get stream data.
Definition: stream.c:375
PblMap * map
Stream map.
Definition: stream.h:81
void * key
This key (copy)
Definition: stream.h:31
Got close request from stream.
Definition: stream.h:60
uint16_t data_len
Data len.
Definition: stream.h:70
const char * peer_name
Definition: stream.h:43
Send data command.
Definition: stream.h:58
struct ksnStreamClass ksnStreamClass
Stream module class structure.
ev_io w_out
Output stream watcher.
Definition: stream.h:29
void ksnStreamDestroy(ksnStreamClass *ks)
Stream module destroy.
Definition: stream.c:49
ksnCQue data structure
Definition: cque.h:39
void * ke
Pointer to ksnetEvMgrClass (to use in watchers)
Definition: stream.h:30
uint8_t stream_name_len
Stream name len.
Definition: stream.h:71
Close stream but not remove from stream map.
Definition: stream.h:61
Close stream command.
Definition: stream.h:59
ksnCQueData * cq
Pointer to CQUEUE Data.
Definition: stream.h:33
Got create request.
Definition: stream.h:56
ksnStreamMapData * ksnStreamGetMapData(ksnStreamClass *ks, void *key, size_t key_len)
Get stream map data by key.
Definition: stream.c:355
int pipe_in[2]
Input (read) pipe.
Definition: stream.h:26
int ksnStreamClosePeer(ksnStreamClass *ks, const char *peer_name)
Close all streams connected to selected peer.
Definition: stream.c:325
ksnStreamClass * ksnStreamInit(void *ke)
Initialize Stream module.
Definition: stream.c:35
int fd_out
Definition: stream.h:45
Stream packet data structure.
Definition: stream.h:67
Stream map data structure.
Definition: stream.h:40
size_t key_len
Key length.
Definition: stream.h:32