原理:https://www.yubaike.com.cn/html/server/unix/341187.html
demo:https://blog.csdn.net/hbsyaaa/article/details/127504803
https://www.yubaike.com.cn/html/server/unix/341187.html
https://zhuanlan.zhihu.com/p/473590839
目录
API
https://blog.csdn.net/weixin_28673511/article/details/129984153
socketpair()函数
用于创建一对相互连接的套接字。它可以用于在同一个进程内部进行进程间通信。这两个套接字可以通过索引0和1在同一个进程内进行通信。其中,索引0的套接字用于读取数据,索引1的套接字用于写入数据。
https://www.yisu.com/ask/36273021.html
https://www.cnblogs.com/bandaoyu/p/16752367.html
struct msghdr
https://blog.csdn.net/qq_41453285/article/details/89810683/
错误整理
-
bind fail
若套接字接口文件存在,那么bind函数会出错,我们可以先把该文件删掉(使用unlink函数). -
error: value of type '__bind<int &, sockaddr *, unsigned long>' is not contextually convertible to 'bool'
https://www.zhihu.com/question/40365500/answer/86200585
socket bind函数和c++11 std::bind冲突了
- 非root用户连接root用户建立的af_local类型的socket?
https://bbs.csdn.net/topics/90428426
c语言调用chmod(unixPath,0777)
,注意是8进制的0777
。
0 条评论