mofee
mofee

Reputation: 155

asp.net core websocket how many times ping fail will be closed

in asp.net core 2.1, websocket middleware has a property KeepAliveInterval, to send "ping" and receive "pong" from client to keep connection alive. But i can not found how many times when the server send "ping" faild (can not receive "pong") and would close the websocket connection? any one know?

Upvotes: 1

Views: 922

Answers (1)

mofee
mofee

Reputation: 155

.net core websocket is not handle the received pong frames. see: https://github.com/dotnet/corefx/blob/26445fd56e5abae36f4bd25d3fbe879fb88525d7/src/Common/src/System/Net/WebSockets/ManagedWebSocket.cs -> HandleReceivedPingPongAsync method.

Upvotes: 0

Related Questions