update docs (#232)

This commit is contained in:
Alessandro Ros
2023-04-09 17:01:38 +02:00
committed by GitHub
parent d736f1d988
commit 2a91a68121
2 changed files with 3 additions and 1 deletions

View File

@@ -221,7 +221,7 @@ type Client struct {
OnTransportSwitch func(err error) OnTransportSwitch func(err error)
// called when the client detects lost packets. // called when the client detects lost packets.
OnPacketLost func(err error) OnPacketLost func(err error)
// called when there's a decode error. // called when a non-fatal decode error occurs.
OnDecodeError func(err error) OnDecodeError func(err error)
// Deprecated: replaced by OnTransportSwitch, OnPacketLost, OnDecodeError // Deprecated: replaced by OnTransportSwitch, OnPacketLost, OnDecodeError
Log ClientLogFunc Log ClientLogFunc

View File

@@ -217,6 +217,7 @@ type ServerHandlerOnPacketLostCtx struct {
// ServerHandlerOnPacketLost can be implemented by a ServerHandler. // ServerHandlerOnPacketLost can be implemented by a ServerHandler.
type ServerHandlerOnPacketLost interface { type ServerHandlerOnPacketLost interface {
// called when the server detects lost packets.
OnPacketLost(*ServerHandlerOnPacketLostCtx) OnPacketLost(*ServerHandlerOnPacketLostCtx)
} }
@@ -228,5 +229,6 @@ type ServerHandlerOnDecodeErrorCtx struct {
// ServerHandlerOnDecodeError can be implemented by a ServerHandler. // ServerHandlerOnDecodeError can be implemented by a ServerHandler.
type ServerHandlerOnDecodeError interface { type ServerHandlerOnDecodeError interface {
// called when a non-fatal decode error occurs.
OnDecodeError(*ServerHandlerOnDecodeErrorCtx) OnDecodeError(*ServerHandlerOnDecodeErrorCtx)
} }