Get socket.io object
var socket = connection.getSocket();
It is similar to socket object howevere "getSocket" makes sure to connect socket if not currently connected.