reza
reza

Reputation: 6358

Unix domain sockets and select

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 correct?

Upvotes: 1

Views: 1451

Answers (2)

owenliang
owenliang

Reputation: 11

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.

Upvotes: 1

Dietrich Epp
Dietrich Epp

Reputation: 213238

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.

Upvotes: 2

Related Questions