Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #597

Re: epoll event handling and writing to client.

From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.os.linux.development.apps
Subject Re: epoll event handling and writing to client.
Date 2013-06-19 12:35 +0100
Message-ID <8761xa8hap.fsf@sapphire.mobileactivedefense.com> (permalink)
References <5a34901e-17e9-4a69-a361-1c471dd84da4@googlegroups.com>

Show all headers | View raw


maheshwariankur11@gmail.com writes:

[...]

> 1)working with read operation for the clients i am able to get only
> one read notification.if client further send data to server (i mean
> second or third time) i did not
>
> get any notification of EPOLLIN and my server waiting in epoll_wait
> call.

You aren't perchance using epoll in edge-triggered mode? If so, you'll
need to continue reading data until you get EAGAIN before it is
guaranteed that you will get another notification when new data
arrives (NB: It is not guaranteed that you won't get a new
notification).

> 2)Secondaly i have to send data to client asynchronously for that i
> have to generate the EPOLLOUT event but i ab not able to generate
> that event as my server is waiting for karnal notification in
> epoll_wait process.

All of the 'file descriptor I/O multiplexing calls' are for
interleaving synchronous I/O. Similar to the statement about read,
when you want to write data, you have to keep writing either until
everything is written or you get EAGAIN. For the second case, EPOLLOUT
will tell you when can continue with writing data to this file
descriptor.

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

epoll event handling and writing to client. maheshwariankur11@gmail.com - 2013-06-19 03:22 -0700
  Re: epoll event handling and writing to client. Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-06-19 12:35 +0100
    Re: epoll event handling and writing to client. ankur <nospam_maheshwariankur11@gmail.com.invalid> - 2013-06-20 10:47 -0500

csiph-web