@jonty Sorry I missed part of your original post where you mentioned you are connecting from a windows machine.
127.0.0.1 is a local only ip which means while your omega can listen on that IP no other machine can connect to it, so instead you need to bind to the public ip on the omega. I assume you are connecting via wifi, so type ifconfig on the omega and find the apcli0 interface and record the IP, probably something like 192.168.x.x or 10.x.x.x. Now change your server code to bind to that IP. On the client machine connect to that IP.
If the client on your windows machine still won't connect you may need to check your windows firewall is not blocking the port.