当前位置: 首页 > news >正文

LIB-ZC, 一个跨平台(Linux)平台通用C/C++扩展库, IO操作

LIB-ZC, 一个跨平台(Linux)平台通用C/C++扩展库, IO操作

  • 本封装主要目的是跨平台
  • 命名空间 zcc
  • 返回 -1 表示出错

函数列表

// 是否可读/可写
int timed_read_write_wait_millisecond(int fd, int read_wait_timeout, int *readable, int *writeable);
int timed_read_write_wait(int fd, int read_wait_timeout, int *readable, int *writeable);
// 带超时, 是否可读
int timed_read_wait_millisecond(int fd, int wait_timeout);
int timed_read_wait(int fd, int wait_timeout);
// 超时读
int timed_read(int fd, void *buf, int size, int wait_timeout);
// 带超时, 是否可写
int timed_write_wait_millisecond(int fd, int wait_timeout);
int timed_write_wait(int fd, int wait_timeout);
// 超时写
int timed_write(int fd, const void *buf, int size, int wait_timeout);
// 是否可读写
int rwable(int fd);
// 是否可读
int readable(int fd);
// 是否可写
int writeable(int fd);
// 设置fd阻塞
int nonblocking(int fd, bool tf = true);
#ifdef _WIN64
int close(HANDLE fd);
#else  // _WIN64
int close(int fd);
#endif // _WIN64
// close_on_exec
int close_on_exec(int fd, bool tf = true);
// 获取真实可读字节数
int get_readable_count(int fd);
#ifdef __linux__
// 跨父子进程接收 fd
int recv_fd(int fd);
// 跨父子进程发送 fd
int send_fd(int fd, int sendfd);
#endif // __linux__
http://www.dtcms.com/a/136435.html

相关文章:

  • 管理与维护samba服务器
  • 信创服务器-大国崛起,信创当道!
  • SpringBoot异常处理之自定义统一的错误处理页面
  • 大模型全景解析:从技术突破到行业变革
  • 专为路由器和嵌入式设备设计的OpenWrt是什么?
  • RabbitMQ架构原理及消息分发机制
  • STM32江科大----------PID算法
  • SpringBoot整合Redis限流
  • 数据中台进化史:从概念萌芽到价值变现的蜕变之路
  • 理解最左前缀原则:联合索引命中规则全解析(含流程图)
  • Flutter PIP 插件 ---- iOS Video Call 自定义PIP WINDOW渲染内容
  • 基于MATLAB与deepSeek-R1的控制系统分析工具开发与应用
  • 打通任督二脉 - Device Plugin 让 k8s “看见” GPU
  • Python Selenium 一小时速通教程
  • 2025 年网络安全的挑战与机遇
  • 静态链接part2
  • 青少年编程与数学 02-016 Python数据结构与算法 24课题、密码学算法
  • Spring Boot一次接口请求涉及的完整执行链路
  • vs2022使用git方法
  • 天元证券|调仓曝光!首批科技基金一季报出炉
  • 数字资产和交易解决方案
  • Nautilus 正式发布:为 Sui 带来可验证的链下隐私计算
  • 【Bluedroid】A2DP Sink播放流程源码分析(三)
  • 东方潮流亮相广州益民艺术馆|朋克编码“艺术家潮玩”系列开幕引爆热潮
  • 计算机网络中科大 - 第7章 网络安全(详细解析)-以及案例
  • 麒麟v10-ky10.x86_64开启日志审计(audit)
  • [特殊字符] MySQL MCP 开发实战:打造智能数据库操作助手
  • 红宝书第四十六讲:Node.js基础与API设计解析
  • 2025年保安员考试题库及答案
  • 【学习笔记】计算机网络(九)—— 无线网络和移动网络