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

python - Strange behavior using PyQt4's 'pyqtSlot' decorator before another decorator -

c# - UnhandledExceptionMode.ThrowException for AppDomain.UnhandledException -

c# - Process.Kill() returns access denied -