Dart API Referencedart:htmlCloseEvent

CloseEvent Interface

A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute.

Extends

Event

Fields

Code final int code #

The WebSocket connection close code provided by the server. See Status codes for possible values.
final int code;

Code final String reason #

A string indicating the reason the server closed the connection. This is specific to the particular server and sub-protocol.
final String reason;

Code final bool wasClean #

Indicates whether or not the connection was cleanly closed.
final bool wasClean;

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.