Trustin Lee schrieb:

2006/1/13, Johannes Zillmann <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

    > 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.


I'don't setp deep into nio or mina core yet,
so is that possible ...

If you haven a connected session and decide now to get directly acces to socketChannel -> tell the SocketIoProcessor that it should not perform any read/writes on the session socket channel (mayby just with setting a sessions attribute)
-> retrieve the socketCjannle from session
-> work with it
-> maybe integrate it back to SocketIoProcessor  io-work

?
Johannes


        

        
                
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Reply via email to