(self, event, destination, encoder=None, flush=True)
Sends a single JSON event to the given destination using the given
        JSON encoder.  When `encoder` is ``None``, it falls back to the default
        JSON encoder of the streamer in the `encoder` property.

        `destination` must be a file-like object or an instance of `GephiConnection`.

        The method flushes the destination after sending the event. If you want to
        avoid this (e.g., because you are sending many events), set `flush` to
        ``False``.
Sends a single JSON event to the given destination using the given
        JSON encoder.  When `encoder` is ``None``, it falls back to the default
        JSON encoder of the streamer in the `encoder` property.
Sends a single JSON event to the given destination using the given JSON encoder . When encoder is None it falls back to the default JSON encoder of the streamer in the encoder property .
def send_event(self, event, destination, encoder=None, flush=True):
        """Sends a single JSON event to the given destination using the given
        JSON encoder.  When `encoder` is ``None``, it falls back to the default
        JSON encoder of the streamer in the `encoder` property.

        `destination` must be a file-like object or an instance of `GephiConnection`.

        The method flushes the destination after sending the event. If you want to
        avoid this (e.g., because you are sending many events), set `flush` to
        ``False``.
        """
        encoder = encoder or self.encoder
        destination.write(encoder.encode(event).encode("utf-8"))
        destination.write(b"\r\n")
        if flush:
            destination.flush()
def send_event ( self , event , destination , encoder = None , flush = True ) : encoder = encoder or self . encoder destination . write ( encoder . encode ( event ) . encode ( "utf-8" ) ) destination . write ( b"\r\n" ) if flush : destination . flush ( )