add automatic WebSocket ping/pong