Source File
error_codes.go
Belonging Package
github.com/quic-go/quic-go/internal/qerr
package qerrimport ()// TransportErrorCode is a QUIC transport error.type TransportErrorCode uint64// The error codes defined by QUICconst (NoError TransportErrorCode = 0x0InternalError TransportErrorCode = 0x1ConnectionRefused TransportErrorCode = 0x2FlowControlError TransportErrorCode = 0x3StreamLimitError TransportErrorCode = 0x4StreamStateError TransportErrorCode = 0x5FinalSizeError TransportErrorCode = 0x6FrameEncodingError TransportErrorCode = 0x7TransportParameterError TransportErrorCode = 0x8ConnectionIDLimitError TransportErrorCode = 0x9ProtocolViolation TransportErrorCode = 0xaInvalidToken TransportErrorCode = 0xbApplicationErrorErrorCode TransportErrorCode = 0xcCryptoBufferExceeded TransportErrorCode = 0xdKeyUpdateError TransportErrorCode = 0xeAEADLimitReached TransportErrorCode = 0xfNoViablePathError TransportErrorCode = 0x10)func ( TransportErrorCode) () bool {return >= 0x100 && < 0x200}// Message is a description of the error.// It only returns a non-empty string for crypto errors.func ( TransportErrorCode) () string {if !.IsCryptoError() {return ""}return tls.AlertError( - 0x100).Error()}func ( TransportErrorCode) () string {switch {case NoError:return "NO_ERROR"case InternalError:return "INTERNAL_ERROR"case ConnectionRefused:return "CONNECTION_REFUSED"case FlowControlError:return "FLOW_CONTROL_ERROR"case StreamLimitError:return "STREAM_LIMIT_ERROR"case StreamStateError:return "STREAM_STATE_ERROR"case FinalSizeError:return "FINAL_SIZE_ERROR"case FrameEncodingError:return "FRAME_ENCODING_ERROR"case TransportParameterError:return "TRANSPORT_PARAMETER_ERROR"case ConnectionIDLimitError:return "CONNECTION_ID_LIMIT_ERROR"case ProtocolViolation:return "PROTOCOL_VIOLATION"case InvalidToken:return "INVALID_TOKEN"case ApplicationErrorErrorCode:return "APPLICATION_ERROR"case CryptoBufferExceeded:return "CRYPTO_BUFFER_EXCEEDED"case KeyUpdateError:return "KEY_UPDATE_ERROR"case AEADLimitReached:return "AEAD_LIMIT_REACHED"case NoViablePathError:return "NO_VIABLE_PATH"default:if .IsCryptoError() {return fmt.Sprintf("CRYPTO_ERROR %#x", uint16())}return fmt.Sprintf("unknown error code: %#x", uint16())}}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |