setup socket.io connection.