Got sockets working (badly but its a start)