New to netty

manish_iitg excellencetechnologies08 at gmail.com
Thu Dec 11 11:25:00 EST 2008


Hello,

I tried what said, but it doesn't solve my problem yet.

My client server communication is like this.


CLIENT --SENDS--> SERVER
SERVER --SENDSBACK--> CLIENT

I want the client to wait for this entire operation, i.e. wait for the
servers response as well. What you said, wait only on the first step, i.e.
when the click writes to the server.


Also can you explain me the use of Execution handler,
OrderedMemoryAwareThreadPoolExecutor, MemoryAwareThreadPoolExecutor.

A what to use in which scenario. 

Thanks


Trustin Lee-2 wrote:
> 
> Hello,
> 
> There are two ways to wait for the completion of the I/O request.  The
> first approach is to call await() or awaitUninterruptibly() of the
> ChannelFuture which is returned by an I/O operation (i.e. write(..)).
> 
> The second way is to add a listener to the returned ChannelFuture.  Your
> listener will be invoked when the operation is done.
> 
> I guess what you want is the first approach, right?  If so, please make
> sure to add the ExecutionHandler to the pipline if you are going to call
> await() or awaitUninterruptible() within the ChannelHandler.  Otherwise
> you will never notified on completion (i.e. dead lock) because it is I/O
> worker thread that notifies the completion and you are waiting for the
> completion in *the* I/O worker thread without ExecutionHandler.
> 
> HTH,
> Trustin
> 
> On Tue, Dec 09, 2008 at 02:26:37PM +0900, manish_iitg wrote:
>> 
>> Hello,
>> 
>> I have another basic question to ask. 
>> The client that i have created is by default non-blocking. Is their
>> anyway
>> to make it non- asynchronous. I want the client to wait for the servers
>> reply and the execution of the code in the client side should not move
>> ahead
>> till such time. 
>  
> -- 
> Trustin Lee, Principal Software Engineer, JBoss, a division of Red Hat
> --
> what we call human nature in actuality is human habit
> --
> http://gleamynode.net/
> 
>  
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/New-to-netty-tp1625621p1643956.html
Sent from the Netty User Group mailing list archive at Nabble.com.




More information about the netty-users mailing list