[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] [libevent-usr] When is a [regular file descriptor] readable or writable?



Hi, everyone,

    I'm reading libevent-2.0 code and have made certain progress:). However, I'm still confused with some basic concepts like "ready" for reading or writing. In the context of sockets, I think I can imagine this "ready" situation: the socket is ready for reading when the receiving buffer receives some data from the lower level of the network stack, and is ready for writing when the sending buffer has enough free space to accept data from the higher level.
    My point here is how it works in terms of regular file, like local disk regular file. Imagine I was monitoring a local regular file descriptor. I can't figure out what actions or conditions can cause the descriptor readable or writable.

Thanks for your reply
harvey