(self, event, *args)
ping Event Handler (Default)

        This is a default event to respond to ``ping`` events
        by sending a ``PONG`` in response. Subclasses or
        components may override this, but be sure to respond to
        ``ping`` events by either explicitly calling this method
        or sending your own ``PONG`` response.
ping Event Handler (Default)
ping Event Handler ( Default )
def ping(self, event, *args):
        """ping Event Handler (Default)

        This is a default event to respond to ``ping`` events
        by sending a ``PONG`` in response. Subclasses or
        components may override this, but be sure to respond to
        ``ping`` events by either explicitly calling this method
        or sending your own ``PONG`` response.
        """

        if len(args) == 2:
            # Client read
            self.fire(PONG(args[1]))
            event.stop()
def ping ( self , event , * args ) : if len ( args ) == 2 : # Client read self . fire ( PONG ( args [ 1 ] ) ) event . stop ( )