DotNetty
DotNetty copied to clipboard
What is the difference between "CloseAsync" and "DisconnectAsync"?
IChannelHandlerContext
's two methods, CloseAsyncand
and DisconnectAsync
, both can kick off the client.
There are two questions:
- What's the difference between these two methods?
- Which method is recommended to kick off the client?
thanks !
https://github.com/Azure/DotNetty/blob/580bde0415a50e570eb9a40b08142d28569ec798/src/DotNetty.Transport/Channels/AbstractChannelHandlerContext.cs#L678-L683
TCP的话就是CloseAsync, UDP不一样