Added ability to emit events by passing data through the client library back to socket.io