1 Star 0 Fork 1

FogVDN-Node/net_traffic_upload

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
net_traffic_upload.h 662 Bytes
一键复制 编辑 原始数据 按行查看 历史
fuqiyang11 提交于 2018-11-03 16:46 +08:00 . change connect_timeout add EISCONN EINTR
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <pthread.h>
// you can change
//
//#define HOST_IP "192.168.99.130"
#define HOST_IP "127.0.0.1"
#define PORT_LOW 49193
#define PORT_HIGH 49202
#define UPLOAD_INTERVAL 30 // seconds
//#define NO_DATA_NO_UPLOAD
// advice not change
//
#define CONNECT_TRY 5
#define CONNECT_TIMEOUT 5000 // useconds
#define SELECT_TIMEOUT_SECOND 3 // seconds
#define SELECT_TIMEOUT_USECOND 0 // useconds
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/FogVDN-Node/net_traffic_upload.git
git@gitee.com:FogVDN-Node/net_traffic_upload.git
FogVDN-Node
net_traffic_upload
net_traffic_upload
master

搜索帮助