OPC Foundation
  • Documents
  • NodeSets
  • Search
7.5.2 Protocol Mapping

The WebSocket protocol allows clients to request that servers use specific sub-protocols with the “Sec-WebSocket-Protocol” header in the WebSocket handshake defined in RFC 6455. The protocols defined by this standard are shown in Table 56.

Table 56– WebSocket Protocols Mappings

Protocol

Description

opcua+uacp

Each WebSocket frame is a MessageChunkas defined in 6.7.2. After the WebSocket is created, the handshake described in 7.1.3is used to negotiate the maximum size of the MessageChunk. The maximum size for a buffer needed to receive a WebSocket frame is the maximum length of a MessageChunk plus the maximum size for the WebSocket frame header.

When using this protocol the payload in each frame is binary (OpCode 0x2 in RFC 6455).

opcua+uajson

Each WebSocket frame is a Messageencoded using the JSON encoding described in 5.4.9. There is no mechanism to negotiate the maximum frame size. If the receiver encounters a frame that exceeds its internal limits it shall close the WebSocket connection and provide a 1009 status code as described in RFC 6455.

When using this protocol the payload in each frame is text (OpCode 0x1 in RFC 6455).

Each WebSocket protocol mapping defined has a TransportProfileUridefined in OPC 10000-7.

The Clientshall request a protocol. If the Serverdoes not support the protocol requested by the Client,the Clientshall close the connection and report an error.

Please report errors or issues with the site to webmaster.

Copyright © 2023 - OPC Foundation