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
Post a Comment