Book Image

Mastering Dart

By : Sergey Akopkokhyants
Book Image

Mastering Dart

By: Sergey Akopkokhyants

Overview of this book

Table of Contents (19 chapters)
Mastering Dart
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

WebSocket


WebSocket is a bidirectional, message-oriented streaming transport between a client and a server. It is a built in TCP that uses an HTTP upgrade handshake. WebSocket is a message-based transport. Its simple and minimal API abstracts all the complexity and provides the following extra services for free:

  • The same-origin policy enforcement

  • Interoperability with the existing HTTP infrastructure

  • Message-oriented communication

  • Availability of subprotocol negotiation

  • Low-cost extensibility

WebSocket is one of the most flexible transports available in the browser. The API enables the layer and delivers arbitrary application protocols between the client and server in a streaming fashion, and it can be initiated on either side at any time.

Note

WebSocket is a set of multiple standards: the WebSocket API and the WebSocket protocol and its extensions.

WebSocket can be useful for the following cases:

  • When the relevance of data is very critical

  • When the solutions very often are based on high-volume data...