var t = m_Socket.SendAsync(buffer, messageType, true, m_CancellationToken);
Because the third argument is true, this websocket client closes connection actively after message is sent.
What is the reason behind this design decision? In most use cases of websocket, I want a ongoing stream where I can repeatedly put my messages into, If I want the connection to be closed as soon as I get the message out, I would use http instead.
In Websocket.SendMessage we have:
Because the third argument is true, this websocket client closes connection actively after message is sent.
What is the reason behind this design decision? In most use cases of websocket, I want a ongoing stream where I can repeatedly put my messages into, If I want the connection to be closed as soon as I get the message out, I would use http instead.