- 博客(3)
- 资源 (4)
- 问答 (1)
- 收藏
- 关注
转载 进程间传递文件描述符--sendmsg,recvmsg,struct msghdr,struct iovec
UNIX域套接字可以在同一台主机上各进程之间传递文件描述符。下面先来看两个函数:[cpp] view plain copy#include <sys/types.h> #include <sys/socket.h> ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags); ssize_...
2018-04-20 15:55:02
1543
转载 利用套接字实现本地通信
使用套接字除了可以实现网络间不同主机间的通信外,还可以实现同一主机的不同进程间的通信,且建立的通信是双向的通信。socket进程通信与网络通信使用的是统一套接口,只是地址结构与某些参数不同。其主要流程如下:代码实现如下:客户端:[cpp] view plain copy//client #include<stdio.h> #include<string.h> #inc...
2018-04-02 13:13:30
2429
原创 Linux C高阶(16)检测网卡与网线连接状态,使用ioctl向socket发送SIOCETHTOOL命令字
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <errno.h>#include <sys/ioctl.h>#include <sys/types.h>#includ
2018-04-02 09:26:58
3162
1
有初学C++ C linux 嵌入式的吗,这里集合,有大量系统学习的博客教程
2021-04-12
TA创建的收藏夹 TA关注的收藏夹
TA关注的人