Skip to main content

Example: Using the Web Socket Client SL Library

Product: CODESYS IIOT Libraries SL

The Web Socket SL Example.project sample project shows how to use of the Web Socket Client SL library. The sample project contains a visualization to establish a bidirectional connection to a web server via the Internet. Communication usually takes place via the TCP port number 443 for secured connections or 80 for unsecured connections.

Note

Parsing and generating messages based on the subprotocol is not implemented in the WebSocket client and has to be done by the layer above (example: MQTT client).

Description

The Web Socket SL Example.project sample project shows how to use of the library for the CFC implementation language.

A visualization can be used to connect to a web socket server and send and receive text messages.

_example_img_web_socket_client_visu.png

System requirements and restrictions

Programming system

CODESYS Development System (version 3.5.18.0 or higher)

Runtime system

CODESYS Control Win (version 3.5.18.0)

Add-on components

-

Additional requirements

Required libraries:

  • SysSocket2 3.5.16.0

  • Net Base Services 3.5.17.0

  • CmpCrypto

  • CmpTls 3.5.15.0 and CmpX509Cert

Note

_example_icon.png DOWNLOAD projects