directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: direct access to sockets
Date Fri, 13 Jan 2006 12:13:35 GMT
2006/1/13, Johannes Zillmann <JZ8_blue@yahoo.de>:
>
> > For now there's no way to achieve the same behavior with this.  But I
> > guess we can implement this by providing a special write request object:
> >
> > IoSession session = ...;
> > session.write( new TransferRequest( fc, 0, 23 ) );
> >
> > WDYT?
>
> Well i think there are 2 sides. The sending and the receiving... ;)
> For the sending part the above approach looks very nice !
> For the receiving part could you think of somthing like :
> socketSession.decoupleSocketChannel()  -> SocketChannel
> ??


Now I got it.  You want to receive data from the channel directly.  This is
not possible because it will cause serious concurrency issue with
SocketIoProcessor.  All I/O has to happen in the worker thread that
SocketIoProcessor manager.  It you want to use blocking I/O for this, then
you'll have to use StreamIoHandler for now.  Please let me know if you have
any good idea to resolve this issue.

Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
PGP Key ID: 0x854B996C

Mime
View raw message