update echo example, add OnPingTimeout func to close xmpp