|
Hi,
I've been try to make mutlthreaded network server with this
kaio-patches.
but the only I have found is this patches doesn't work
well with socket.
To say this patch based on kernel, work well, really
fast make no sense for socket.
socket is duplex and must be because network events are
unpredictable.
but aio_read, aio_write of this patch does not.
for example,
this fraction of code stop the program
for mysocket[5] SOCKET --connected or accepted
sockets
for myaiocb[10] aiocb -- properly configured aiocb structure
with
myaiocb[2*i].aio_fildes=myaiocb[2*i+1]=mysocket[i];
for(int i=0;i>5;i++)
{
aio_read(&myaiocb[2*i]);
aio_write(&myaiocb[2*i+1]);
}
the messages received by a client
--server say:hello
server say:hello
server say:hello
server say:hello
---------------------
no fifth message returns, until the client send some messages to the
server
and so the previous aio_read's sighandler called.
Hee S. KIm
|