diff --git a/client.go b/client.go index cd55623d..9f04f1d7 100644 --- a/client.go +++ b/client.go @@ -221,7 +221,7 @@ type Client struct { OnTransportSwitch func(err error) // called when the client detects lost packets. OnPacketLost func(err error) - // called when there's a decode error. + // called when a non-fatal decode error occurs. OnDecodeError func(err error) // Deprecated: replaced by OnTransportSwitch, OnPacketLost, OnDecodeError Log ClientLogFunc diff --git a/server_handler.go b/server_handler.go index 918adf9b..51a8b364 100644 --- a/server_handler.go +++ b/server_handler.go @@ -217,6 +217,7 @@ type ServerHandlerOnPacketLostCtx struct { // ServerHandlerOnPacketLost can be implemented by a ServerHandler. type ServerHandlerOnPacketLost interface { + // called when the server detects lost packets. OnPacketLost(*ServerHandlerOnPacketLostCtx) } @@ -228,5 +229,6 @@ type ServerHandlerOnDecodeErrorCtx struct { // ServerHandlerOnDecodeError can be implemented by a ServerHandler. type ServerHandlerOnDecodeError interface { + // called when a non-fatal decode error occurs. OnDecodeError(*ServerHandlerOnDecodeErrorCtx) }