Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blocks:api:tcp [2023-04-18 16:35]
admin created
blocks:api:tcp [2024-02-02 08:55] (current)
admin Linked to docs
Line 1: Line 1:
 ====== Raw TCP Socket API ====== ====== Raw TCP Socket API ======
  
-This API is conceptually similar to the property publish/subscribe [[blocks:api:javascript|Javascript APIs]] available to web cllients, but does not require a browser envoronment and websocket support. Instead, it's based on a raw TCP socket (e.g. a "telnet" onnection).+This API is conceptually similar to the property publish/subscribe [[blocks:api:javascript|Javascript APIs]] available to web cllients, but does not require a browser envoronment and websocket support. Instead, it's based on a raw TCP socket (e.g. a "telnet" connection).
  
 The API is implemented by a [[https://github.com/pixilab/blocks-script/tree/master/user-archive|user script named TCPProtocol]], which you must [[blocks:drivers:concepts#using_a_device_driver|install]] and configure on your blocks server in order to use it. A fully working example of how to use this API from a [[blocks:app-note:unity|Unity application can be found here]]. The API is implemented by a [[https://github.com/pixilab/blocks-script/tree/master/user-archive|user script named TCPProtocol]], which you must [[blocks:drivers:concepts#using_a_device_driver|install]] and configure on your blocks server in order to use it. A fully working example of how to use this API from a [[blocks:app-note:unity|Unity application can be found here]].
Line 46: Line 46:
 ==== Security Considerations ==== ==== Security Considerations ====
  
-Since a plain TCP connection provides no security, a while/black-list mechanism is provided,+Since a plain TCP connection provides no security, a white/black-list mechanism is provided,
 allowing you to explicitly state which properties that may (or may not) be set through allowing you to explicitly state which properties that may (or may not) be set through
-the protocol. This mechanism does not currently limit which properties can be subscribed to.+this API/protocol. This mechanism does not currently limit which properties can be subscribed to.
 Specify this as a JSON file located at script/files/TCPProtocol.json, containing data Specify this as a JSON file located at script/files/TCPProtocol.json, containing data
-as described by the TCPProtocolConfig interface below. If no configuration file is provided,+as described [[https://github.com/pixilab/blocks-script/blob/37f425382a218bd403c1b65954e0df623fdce27e/user-archive/TCPProtocol.ts#L49|here]]. If no configuration file is provided,
 this protocol provides unfettered access to ALL properties (which will be indicated by a this protocol provides unfettered access to ALL properties (which will be indicated by a
 log message). log message).