Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
net_tcp.h File Reference
#include <pbl.h>

Go to the source code of this file.

Data Structures

struct  ksnTcpClass
 File: net_tcp.h Author: Kirill Scherba. More...
 
struct  ev_ksnet_io
 KSNet event io. More...
 

Typedefs

typedef struct ksnTcpClass ksnTcpClass
 File: net_tcp.h Author: Kirill Scherba. More...
 
typedef struct ev_ksnet_io ev_ksnet_io
 KSNet event io. More...
 

Functions

ksnTcpClassksnTcpInit (void *ke)
 
void ksnTcpDestroy (ksnTcpClass *kt)
 
struct ev_io * ksnTcpCb (struct ev_loop *loop, ev_ksnet_io *w, int fd, void(*ksnet_read_cb)(struct ev_loop *loop, ev_io *watcher, int revents), void *data)
 
void ksnTcpCbStop (struct ev_loop *loop, ev_io *watcher, int close_flg, int remove_flg)
 
int ksnTcpServerCreate (ksnTcpClass *kt, int port, void(*ksnet_cb)(struct ev_loop *loop, struct ev_ksnet_io *watcher, int revents, int fd), void *data, int *port_created)
 
void ksnTcpServerStop (ksnTcpClass *kt, int sd)
 
void ksnTcpServerStopAll (ksnTcpClass *kt)
 
void ksnTcpServerStopAllClients (ksnTcpClass *kt, int sd)
 
int ksnTcpGetServer (ksnTcpClass *kt, int sd)
 
int ksnTcpClientCreate (ksnTcpClass *kt, int port, const char *server)
 

Typedef Documentation

typedef struct ev_ksnet_io ev_ksnet_io

KSNet event io.

typedef struct ksnTcpClass ksnTcpClass

File: net_tcp.h Author: Kirill Scherba.

Created on March 29, 2015, 6:43 PM Updated to use in libksmesh on May 06, 2015, 21:55 Adapted to use in libteonet on July 24, 2015, 11:56 TCP Class data

Function Documentation

struct ev_io* ksnTcpCb ( struct ev_loop *  loop,
ev_ksnet_io w,
int  fd,
void(*)(struct ev_loop *loop, ev_io *watcher, int revents)  ksnet_read_cb,
void *  data 
)
Examples:
teotcp.c.

Referenced by tcp_server_accept_cb().

void ksnTcpCbStop ( struct ev_loop *  loop,
ev_io *  watcher,
int  close_flg,
int  remove_flg 
)
Examples:
teotcp.c.

Referenced by tcp_server_receive_cb().

int ksnTcpClientCreate ( ksnTcpClass kt,
int  port,
const char *  server 
)
Examples:
teol0cli.c.

Referenced by event_cb(), and ksnTCPProxyClientConnect().

void ksnTcpDestroy ( ksnTcpClass kt)

Referenced by modules_destroy().

int ksnTcpGetServer ( ksnTcpClass kt,
int  sd 
)
Examples:
teotcp.c.

Referenced by tcp_server_receive_cb().

ksnTcpClass* ksnTcpInit ( void *  ke)

Referenced by modules_init().

int ksnTcpServerCreate ( ksnTcpClass kt,
int  port,
void(*)(struct ev_loop *loop, struct ev_ksnet_io *watcher, int revents, int fd ksnet_cb,
void *  data,
int *  port_created 
)
Examples:
teotcp.c.

Referenced by event_cb(), and ksnTCPProxyServerStart().

void ksnTcpServerStop ( ksnTcpClass kt,
int  sd 
)

Referenced by ksnTCPProxyServerStop().

void ksnTcpServerStopAll ( ksnTcpClass kt)
Examples:
teotcp.c.

Referenced by tcp_server_receive_cb().

void ksnTcpServerStopAllClients ( ksnTcpClass kt,
int  sd 
)
Examples:
teotcp.c.

Referenced by tcp_server_receive_cb().