The second. I have a TCP session to a client and I am seeing writes pile up in the queue. If I cannot write a message in 500ms then, if it hasn't started writing, then I want to remove it from the queue and cancel the write request. David
David R Robison Open Roads Consulting, Inc. 103 Watson Road, Chesapeake, VA 23320 phone: (757) 546-3401 e-mail: drrobi...@openroadsconsulting.com web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 On 11/28/2012 3:46 PM, Emmanuel Lécharny wrote: > Le 11/28/12 9:26 PM, David R Robison a écrit : >> Is there a way to cancel a pending write? Maybe WriteFuture.cancel()? > No, you can't, I mean not easily. > > In fact, there are two cases : > 1) The message is currently being written (I mean, it's partially sent, > but there are some remaining parts to send) : we can, if need be, delete > the pending message in the session. > 2) The message is still in the write queue : You *may* be bale to > retrieve the queue, and remove the message from it. > > That would most certainly need some addition in the API. > > Give me a few more hours to see what can be done. > > Btw, in mhat kind of context do you need to cancel a writeFuture ? > > This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, please delete this email immediately.