Was implementing wrong end of sockets...