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

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -