netty - Difference between calling close() directly and using ChannelFutureListener.CLOSE -
i'm using netty 3.6.6.
could explain difference between following 2 codes?
channel.close();
channel.write(channelbuffers.empty_buffer).addlistener(channelfuturelistener.close);
when used no 1, found netty sent tcp fin before sending packets wrote. consequently, client couldn't packets server sent. couldn't find problem no 2.
i don't understand why no 1 makes problem. what's difference?
thanks in advance.
i new netty, here option: 1.will directly close channel no matter whether or not have unsend packets. 2.will add listener channelfuture detect if packets sented , close channel
Comments
Post a Comment