Send ping messages to keep outgoing websocket connection alive. Perform reconnect if connection closes.