Documentation
¶
Overview ¶
Package codes defines application-level codes used to signal the reason for closing a QUIC connection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeStrings ¶
func CodeStrings() []string
CodeStrings returns a slice of all String values of the enum
Types ¶
type Code ¶
type Code quic.ApplicationErrorCode
Code represents an application-level QUIC connection close code. These codes indicate the reason why the server is terminating the connection and saying goodbye to the client.
const ( // StopServer indicates that the server is stopping and the connection // is closed as part of a server shutdown. StopServer Code = iota // stop server // ToManyConns indicates that the server has too many connections // and cannot accept more, so it closes this one. ToManyConns // to many connections // Done indicates a normal termination of the connection, i.e., // the server is done interacting and closes the connection gracefully. Done // bye )
func CodeString ¶
CodeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Code) IsACode ¶
IsACode returns "true" if the value is listed in the enum definition. "false" otherwise
func (Code) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Code
func (*Code) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Code