Skip to content

Tag: select

Calling “select” on fd 0 requires to fire

I’m trying to use “select()” to test if a key has been struck and then read it. It sort of works but only if {Enter} is pressed after the character. Sample code is as follows: If I press A nothing happens, but if I Press A{Enter}, the output is: The output is the same if I press ABC{Enter} W…

chaining multiple epoll instances

Can we add file descriptor returned by epoll_create to another epoll instance using epoll_ctl. how do we chain multiple epoll instances in the application, lets say if we have 2 epoll instances one coming from the application and the other coming from library. Please advise. Answer From man epoll Q3 Is the ep…

Select() to read in sockets

I have a client server client connection where the server reads the message sent by the client every 1 second but I do not want the server to keep on waiting for a message for too long. I tried using the select() function but the server continues waiting for some message to read. Could anyone tell me what I a…

Select in loop – work all the time – linux

I got next question about select: How to make select in loop ? I try to do like that: But there all the time show: ,, no communicate”. Is it the correct way to create select which work all the time? I am not sure so I prefer to ask. I try to find information in books but with no