gossamer/close_event
Types
A CloseEvent represents an event that occurs when a WebSocket
connection is closed.
pub type CloseEvent {
CloseEvent(code: Int, reason: String, was_clean: Bool)
}
Constructors
-
CloseEvent(code: Int, reason: String, was_clean: Bool)Arguments
- code
-
Returns the WebSocket connection close code provided by the server.
- reason
-
Returns the WebSocket connection close reason provided by the server.
- was_clean
-
Returns true if the connection closed cleanly; false otherwise.