java - What is the difference between writing and writing with flush? -


Recently I was experimenting with NATI I came into the following problem:

< Code> ctx.channel () Write (New TextWebSet Frame ("Hello")) Hello on the back side of the customer, but ctx.channel () Write and flush (New TextWeb Sockfreem ("Hello"))

What is the difference between the two? ctx is ChannelHandlerContext .

According to the doctor

  channel .writeAndFlush (msg);  

  is a shortcut for channel.write (msg); Channel.flush ();  

and flush () flush ( writes ) all pending buffers.


Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

ios - Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc? -