Jetty Development Guide: WebSocket Introduction

Source: Internet
Author: User

WebSocket is a new HTTP-based two-way communication protocol.
It is based on a low-level framework protocol. Use UTF-8 text or binary format to pass information.


The individual information in WebSocket can be any length (however, the underlying framework has a single frame 63bits limit).
There is no limit to the number of messages sent.


The information is continuously sent, and the underlying protocol does not support cross-information.
A websocket connection undergoes some major state changes:
1) connecting:http upgrade to WebSocket in progress
2) Open:http upgrade is successful, and the socket is now open and ready to read/write
3) Closing:websocket Close handshake in progress
4) The Closed:websocket has been closed. Can't do a lot of other reading/writing
When a websocket is closed, a status code and a short reason string are provided.

What the jetty offers

Jetty provides an implementation of the following standards and specifications.

RFC-6455

WebSocket protocol
We support finally announcing the specification, version 13.
Jetty uses Autobahn testsuite to test its WebSocket protocol implementation.

JSR-356

Java WebSocket API (javax.websocket)
This is the officially available Java API.

Unstable standards and Specifications:

perframe-compression

permessage-compression

WebSocket APIs

The APIs and libraries provided. In order to use jetty to implement your websocket. Contains:
1) Jetty WebSocket API
2) Jetty WebSocket Server API
3) Jetty WebSocket Client API
4) Java WebSocket Client API
5) Java WebSocket Server API
We'll all be talking about that later.

Jetty Development Guide: WebSocket Introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.