op_send()

注意: 需要 Shared Code 功能

摘要

向已连接的 socket 发送一条消息。

语法

op_send (sockfd, buf, len, flags)

参数 类型 说明
sockfd int 发送端 socket 的文件描述符
buf const void * 包含待发送消息的缓冲区
len size_t 消息长度
flags int 未使用(传 0)

返回类型

int

已发送的字符数;失败时返回 -1。

头文件

shared_code_support.h

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com