Finally got sockets working