Skip to content

xboss/EasyTCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyTCP

EasyTCP is an asynchronous tcp library implemented in c language, including server and client implementations.

状态

“又不是不能用”,应用在SKCPTUN

环境

运行环境:Linux,MacOS

依赖库:libev

使用

客户端代码中需要实现etcp_cli_conf_t中的:

void (*on_recv)(int fd, char *buf, int len);
void (*on_close)(int fd);

服务端代码中需要实现etcp_serv_conf_t中的:

int (*on_accept)(int fd);
void (*on_recv)(int fd, char *buf, int len);
void (*on_close)(int fd);

编译测试代码:

cd EasyTCP
mkdir build
make