Normally in Transmission Control Protocol (TCP) is used with Netcat. Netcat is a simple Unix utility which reads and writes data across network connections, using TCP or UDP protocol (Check this link for more information: http://nc110.sourceforge.net/)
I personally recommend you to use it, check this link: https://linux.die.net/man/1/nc, it can be very helpful and you can learn how to use it. Try to use it first in your computer with Linux and then try to use it in your Edison. This package should be already included in your Edison Image.
I hope you find this information useful.
I successfully connected to our socket by installing websocket-client by typing pip install websocket-client and using this python code (not that pretty but it works) (indentation was scrambled when I copy pasted):
#!/usr/bin/python import os import time import json from websocket import create_connection def handleAction(action, args): print(action) # Do something with the action while True: time.sleep(8) try: print("create connection to socket") socket = create_connection("ws://111.222.333.444:555") try: while True: print("reading data..") result = socket.recv() print("got data: ") print(result) print(type(result)) data = json.loads(result) action = data["action"] args = data["args"] handleAction(action, args) except Exception as error: print("socket receive error") print(error) socket.close() except Exception as error: print("socket error") print(error) socket.close()