First, you must be using a version of the software that supports the socket server. All versions after and including 1.1.18 included the socket server, but the current documentation and sample code only applies to the latest software release.
Check that you are using the most recent software release:
Open Options Menu
Open Developer Tab
Check box to enable socket server.
(platform specific) accept firewall changes
Command Line option
For automated environments, you can launch the Logic software with a
-socket command line option to cause the socket server to be enabled by default.
trello ID: 5615390cb22fd44d4ccedc6f