Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix domain socket学习 #6

Open
yorkie opened this issue Oct 27, 2013 · 1 comment
Open

Unix domain socket学习 #6

yorkie opened this issue Oct 27, 2013 · 1 comment
Labels

Comments

@yorkie
Copy link
Owner

yorkie commented Oct 27, 2013

Unix domain socket或称IPC socket是用来提供在同一台机器内,两个进程用来交换数据的端口,然而与命名pipeline相比,这个本地的socket以连接模式或无连接字节流的方式创建,而pipe只能通过后者来创建。

进程在使用Unix domain socket不需要共享一个相同的对象,其API与网络socket类似,但并不使用网络协议来进行通信。Unix domain socket是Posix操作系统的一个标准组件。

在使用Unix domain socket时,需要指定一个处在磁盘的文件路径,一般以sock为拓展名后缀,然后并不用担心Unix domain socket在性能上的问题,因为这里指定文件路径仅仅是作为命名空间,标示着监听相同文件路径的的进程可以进行数据交换,而真正的数据交换完全是系统在内核空间内进行的。

@yorkie yorkie closed this as completed Jan 26, 2014
@yorkie yorkie reopened this Sep 11, 2015
@yorkie yorkie added Notes and removed question labels Sep 11, 2015
@qinyinglian
Copy link

膜拜大神

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants