码迷,mamicode.com
首页 > 系统相关 > 详细

APUE:高级进程间通信

时间:2017-05-29 21:45:15      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:结构体   cpp   ror   each   desc   结构   ext   tor   protoc   

这一章核心内容:使用 UNIX 域套接字传送文件描述符。

 

/* Create two new sockets, of type TYPE in domain DOMAIN and using
   protocol PROTOCOL, which are connected to each other, and put file
   descriptors for them in FDS[0] and FDS[1].  If PROTOCOL is zero,
   one will be chosen automatically.  Returns 0 on success, -1 for errors.  */
extern int socketpair (int __domain, int __type, int __protocol,
		       int __fds[2]) __THROW;

 

文件描述符的传送以来 cmsghdr 结构体。具体直接看书上源码。

APUE:高级进程间通信

标签:结构体   cpp   ror   each   desc   结构   ext   tor   protoc   

原文地址:http://www.cnblogs.com/mfmans/p/6918987.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!