Added 'connection' event, 'data' event.