Asynchronous IO

tsuna tsunanet at gmail.com
Wed Aug 11 12:05:21 EDT 2010


On Tue, Aug 10, 2010 at 11:50 PM, arsene lin
<javadeveloper999 at yahoo.co.uk> wrote:
> However, I also read some document on the internet saying GNU/ Linux, which
> will be the target system to run my programe, does not support os level
> asynchronous socket io

The document you read is either wrong or misleading.  On Linux (and
many other POSIX systems) you can set O_NONBLOCK on a socket's file
descriptor using fcntl().  You can also achieve something similar
using ioctl() and the FIONBIO flag.  Anyways, when you combine this
with epoll (Linux) / kqueue (*BSD) you can effectively do asynchronous
socket I/O.

-- 
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com


More information about the netty-users mailing list