WebSocket session
The client can send or receive messages thanks to the session. The session is represented by the javax.websocket.Session
interface.
The session is generated at runtime. Two sessions start when you connect to a WebSocket--one for the client and one for the server. See the details of these functions in the next paragraphs.
Security
The session preserves security information for the connection:
- Negotiated sub protocol
- User principal
- User properties
- Negotiated extensions
- Function verifying if a connection is secure
The security configuration in the WebSockets depends on the used protocol. Setting the socket server with the HTTPS protocol, we get a good level of security.
HTTPS
HTTPS (HyperText Transfer Protocol over Secure Socket Layer), also known as HTTP over SSL, HTTP over TLS and Secure HTTP) is a secure communication protocol working through a network of computers, widely used on the internet.
HTTPS is communication via HTTP (HyperText Transfer Protocol) inside an encrypted connection...