<commit_before># WebSocket Interface

To enable the WebSocket interface for a specific device you need to set the Device
or Link Application to `websocket`.

To connect to the WebSocket, open URL `ws://server:8080/ws/<type>/<name>/<format>`. The
URL is used to select the target device(s) as well as the desired format.

  <type>/<name>      | Behaviour
 --------------------|--------------------------------------------------------------------
  /devices/*123*/... | Connects to a device with a DevEUI=*123*.
  /links/*456*/...   | Connects to a link (active node) with a DevAddr=*456*.
  /groups/*ABC*/...  | Connects to all websocket devices whose **AppID** is set to *ABC*.

Multiple parallel connections may be established to one URL.
When the device sends a frame, all connected clients will receive the application data.
Any of the clients may then send a response back. If multiple clients send data to
the device the frames will be enqueued and sent one by one. The enqueued *Downlinks*
can be viewed via the [Administration interface](Administration.md).

  <format>           | Behaviour
 --------------------|--------------------------------------------------------------------
  .../raw            | Transmits the application data only, no port numbers nor flags.
  .../json           | Transmits JSON structures.
<commit_msg>Fix formatting.<commit_after># WebSocket Interface

To enable the WebSocket interface for a specific device you need to set the Device
or Link Application to `websocket`.

To connect to the WebSocket, open URL `ws://server:8080/ws/<Type>/<Name>/<Format>`. The
URL is used to select both the target device(s) as well as the desired format.

  Type / Name        | Behaviour
 --------------------|--------------------------------------------------------------------
  /devices/*123*/... | Connects to a device with a DevEUI=*123*.
  /links/*456*/...   | Connects to a link (active node) with a DevAddr=*456*.
  /groups/*ABC*/...  | Connects to all websocket devices whose **AppID** is set to *ABC*.

Multiple parallel connections may be established to one URL.
When the device sends a frame, all connected clients will receive the application data.
Any of the clients may then send a response back. If multiple clients send data to
the device the frames will be enqueued and sent one by one. The enqueued *Downlinks*
can be viewed via the [Administration interface](Administration.md).

  Format             | Behaviour
 --------------------|--------------------------------------------------------------------
  .../raw            | Transmits the application data only, no port numbers nor flags.
  .../json           | Transmits JSON structures.

{'fraction_non_alphanumeric': 0.21042830540037244, 'fraction_numerical': 0.011918063314711359, 'mean_word_length': 1.9646799116997793, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1021147', 'n_tokens_mistral': 677, 'n_tokens_neox': 625, 'n_words': 315}