Michael Bauroth wrote:
> Great info! Please see in advance my comments / questions ...
> 
> Niklas Therning wrote:
> 
>> ...
>>
>> The session.setTrafficMask(TrafficMask.NONE) prevents any data to be
>> read from the underlying socket. Since the example does this immediately
>> as the session is created no buffering will be necessary (the OS will do
>> the buffering so we don't have to). Once the proxy has established a
>> connection to the server the traffic mask will be changed to allow for
>> any waiting data to be delivered.
> 
> 
> I guess that this happens in overloaded sessionOpened method for the
> server side? So it is at the end an alternative approach for the methods
> pauseRead / resumeRead? Or can the Trafficmask handle more things?

Yes, you're correct. setTrafficMask(TrafficMask.NONE) is equivalent to
to calling

suspendRead();
suspendWrite();

I had forgotten about those methods. :) The traffic mask stuff doesn't
give you anything extra over the suspend/resume methods.

> 
> Last question: Yesterday I've written a request to the mailing list
> (topic "Implementation details"). Do you have eventually some more time
> to explain these topics too?

I'll have a look at it tonight after work. I'll see if I can answer them.

/Niklas

Reply via email to