This TransportProtocolsends OPC UA Connection Protocol messages over WebSockets.

WebSockets is a bi-directional protocol for communication via a web server which is commonly used by browser based applications to allow the web server to asynchronously send information to the client. WebSockets uses the same default port as HTTP or HTTPS and initiates communication with an HTTP request. This makes it very useful in environments where firewalls limit traffic to the ports used by HTTP or HTTPS.

WebSockets use HTTP, however, in practice a WebSocket connection is only initiated with a HTTP GET request and the web server provides an HTTP response. After that exchange, all traffic uses the binary framing protocol defined by RFC 6455.

A Serverthat supports the WebSockets transport shall publish one or more Endpointswith the scheme ‘opc.wss’. The TransportProfileUrishall be one of the URIs for WebSockets transports defined in OPC 10000-7. The TransportProfileUri specifies the encoding and security protocol used to construct the OPC UA messages sent via the WebSocket.

The SecurityModeand SecurityPolicyUriof the Endpointcontrol the security applied to the messages sent via the WebSocket. This allows the messages to be secure even if the WebSocket connection is established via untrusted HTTPS proxies.

Figure 20summarizes the complete process for establishing communication over a WebSocket.

image023.png

Figure 20– Setting up Communication over a WebSocket

Figure 20assumes the opcua+uacp protocol mapping (see 7.5.2).