DotNetty icon indicating copy to clipboard operation
DotNetty copied to clipboard

What is the difference between "CloseAsync" and "DisconnectAsync"?

Open gsw945 opened this issue 5 years ago • 1 comments

IChannelHandlerContext's two methods, CloseAsyncand and DisconnectAsync, both can kick off the client.

There are two questions:

  1. What's the difference between these two methods?
  2. Which method is recommended to kick off the client?

thanks !

gsw945 avatar Aug 13 '19 02:08 gsw945

https://github.com/Azure/DotNetty/blob/580bde0415a50e570eb9a40b08142d28569ec798/src/DotNetty.Transport/Channels/AbstractChannelHandlerContext.cs#L678-L683

TCP的话就是CloseAsync, UDP不一样

egmkang avatar Feb 11 '20 08:02 egmkang