开发者

Unix domain sockets and select

开发者 https://www.devze.com 2023-03-31 02:25 出处:网络
Just to make sure sure, one can call select on a Unix Domain socket. Correct? Also one can mix different types of sockets in a select statement. Is that corre开发者_Python百科ct?Yes, that is correct.T

Just to make sure sure, one can call select on a Unix Domain socket. Correct? Also one can mix different types of sockets in a select statement. Is that corre开发者_Python百科ct?


Yes, that is correct. The only type of file descriptor you should not put in a select call is a regular file, because regular files are always considered ready, even if reading from them would block.


of course,a socket/pipe/unix domain/msgqueue and something like that will be ok~

you may use sockpair right now , select / poll / epoll can get it.

0

精彩评论

暂无评论...
验证码 换一张
取 消