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)
// 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

View File

@@ -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)
}