Closed lth3726381 closed 7 years ago
The OnError callback will be invoked on the handle.
Which OnError? Only found a param named OnError in StreamHandle.OnRead,and it won't be invoked when client disconnect. Is there any public callback like "OnClose" and it will be invoked when a handle is disposing?(when disconnect by remote,not the CloseHandle method)
Another way to get the "OnClose" callback is checking ReadableBuffer.Count==0
in OnAccept
. but it's not friendly to newer(me). A public callback setter is more intuitively,Or write a check method into example.
https://github.com/StormHub/NetUV/blob/dev/src/NetUV.Core/Handles/StreamHandle.cs#L70 When a new stream starts and the OnRead is called with callbacks of accept/error/complete The OnError callback will be invoked if any internal handle errors happened.
In the Example EchoServer/Client ,when remote tcp server or client disconnected,there are some logs printed on console,but no callback. How can I do jobs when client disconnect?