ConnectionCloseFrame class

CONNECTION_CLOSE Frame (Type 0x0b) Signals graceful or error termination of the connection. Contains error code, frame type that caused error (if applicable), and a human-readable reason phrase.

Inheritance

Constructors

ConnectionCloseFrame({required int errorCode, int frameType = 0, String reasonPhrase = ''})

Properties

errorCode int
final
frameType int
final
hashCode int
The hash code for this object.
no setterinherited
length int
Calculate the length of the serialized frame.
no setteroverride
reasonPhrase String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type FrameType
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBytes() Uint8List
Serialize the frame into a byte list.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromBytes(ByteData view, int offset) ConnectionCloseFrame
A factory constructor to deserialize a frame from bytes.
override