add more usage of onerror callback
example chat no longer use ssl, much faster