Module Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body ImportFrom alias identifier handlers ExceptHandler type NameLoad body ClassDef bases NameLoad body Pass decorator_list ImportFrom alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str Str ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad While AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad AttributeLoad NameLoad attr attr body Break TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad keyword Str handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Break decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr BoolOpOr Call NameLoad NameLoad Str Call NameLoad NameLoad Str Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Str body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BoolOpAnd CompareIs AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body TryFinally body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler body Pass finalbody Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpOr AttributeLoad NameLoad attr CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore IfExp NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If BoolOpOr Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad NameLoad attr keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad NameLoad attr keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr orelse Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr While NameLoad body AugAssignAdd NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad orelse If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeStore NameLoad attr NameLoad TryFinally body If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Num Str orelse Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot NameLoad CompareGt AttributeLoad NameLoad attr Num body Return NameLoad Assign AttributeStore NameLoad attr BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr NameLoad Return NameLoad If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Return NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad With Call NameLoad NameLoad keyword AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr While UnaryOpNot AttributeLoad NameLoad attr body If UnaryOpNot Call AttributeLoad NameLoad attr body Break finalbody Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A logging N/A socket N/A ssl N/A time N/A threading N/A types N/A N/A OpenSSL.SSL Error pyOpenSSLError N/A N/A N/A ImportError N/A pyOpenSSLError N/A Exception N/A N/A N/A ws4py WS_KEY WS_VERSION ws4py.exc HandshakeError StreamClosed ws4py.streaming Stream ws4py.messaging Message PingControlMessage PongControlMessage ws4py.compat basestring unicode N/A DEFAULT_READING_SIZE 2 N/A logger N/A N/A logging getLogger ws4py N/A __all__ N/A WebSocket EchoWebSocket Heartbeat Heartbeat N/A N/A threading Thread N/A __init__ N/A N/A self websocket frequency N/A 2.0 N/A N/A 
        Runs at a periodic interval specified by
        `frequency` by sending an unsolicitated pong
        message to the connected peer.

        If the message fails to be sent and a socket
        error is raised, we close the websocket
        socket automatically, triggering the `closed`
        handler.
         N/A N/A N/A N/A threading Thread __init__ self N/A N/A self websocket websocket N/A N/A self frequency frequency N/A __enter__ N/A N/A self N/A N/A N/A N/A self frequency N/A N/A N/A N/A self start N/A self N/A __exit__ N/A N/A self exc_type exc_value exc_tb N/A N/A N/A N/A N/A self stop N/A stop N/A N/A self N/A N/A N/A N/A self running False N/A run N/A N/A self N/A N/A N/A N/A self running True N/A N/A self running N/A N/A N/A N/A time sleep N/A self frequency N/A N/A N/A self websocket terminated N/A N/A N/A N/A N/A N/A N/A N/A self websocket send N/A PongControlMessage data beep N/A N/A N/A N/A socket error N/A N/A N/A N/A logger info Heartbeat failed N/A N/A N/A self websocket server_terminated True N/A N/A N/A N/A self websocket close_connection N/A N/A N/A WebSocket N/A object N/A N/A  Represents a websocket endpoint and provides a high level interface to drive the endpoint.  __init__ N/A N/A self sock protocols extensions environ heartbeat_freq N/A None None None None N/A N/A  The ``sock`` is an opened connection
        resulting from the websocket handshake.

        If ``protocols`` is provided, it is a list of protocols
        negotiated during the handshake as is ``extensions``.

        If ``environ`` is provided, it is a copy of the WSGI environ
        dictionnary from the underlying WSGI server.
         N/A N/A self stream N/A Stream always_mask False N/A 
        Underlying websocket stream that performs the websocket
        parsing to high level objects. By default this stream
        never masks its messages. Clients using this class should
        set the ``stream.always_mask`` fields to ``True``
        and ``stream.expect_masking`` fields to ``False``.
         N/A N/A self protocols protocols N/A 
        List of protocols supported by this endpoint.
        Unused for now.
         N/A N/A self extensions extensions N/A 
        List of extensions supported by this endpoint.
        Unused for now.
         N/A N/A self sock sock N/A 
        Underlying connection.
         N/A N/A self _is_secure N/A N/A hasattr sock _ssl N/A hasattr sock _sslobj N/A 
        Tell us if the socket is secure or not.
         N/A N/A self client_terminated False N/A 
        Indicates if the client has been marked as terminated.
         N/A N/A self server_terminated False N/A 
        Indicates if the server has been marked as terminated.
         N/A N/A self reading_buffer_size DEFAULT_READING_SIZE N/A 
        Current connection reading buffer size.
         N/A N/A self environ environ N/A 
        WSGI environ dictionary.
         N/A N/A self heartbeat_freq heartbeat_freq N/A 
        At which interval the heartbeat will be running.
        Set this to `0` or `None` to disable it entirely.
         N/A N/A self _local_address None N/A N/A self _peer_address None N/A local_address N/A N/A self N/A N/A N/A 
        Local endpoint address as a tuple
         N/A N/A N/A self _local_address N/A N/A N/A self _local_address N/A N/A N/A self sock getsockname N/A N/A N/A len N/A self _local_address 4 N/A N/A N/A self _local_address N/A N/A self _local_address N/A 2 N/A N/A self _local_address N/A property peer_address N/A N/A self N/A N/A N/A 
        Peer endpoint address as a tuple
         N/A N/A N/A self _peer_address N/A N/A N/A self _peer_address N/A N/A N/A self sock getpeername N/A N/A N/A len N/A self _peer_address 4 N/A N/A N/A self _peer_address N/A N/A self _peer_address N/A 2 N/A N/A self _peer_address N/A property opened N/A N/A self N/A N/A N/A 
        Called by the server when the upgrade handshake
        has succeeeded.
         N/A N/A close N/A N/A self code reason N/A 1000 N/A N/A 
        Call this method to initiate the websocket connection
        closing by sending a close frame to the connected peer.
        The ``code`` is the status code representing the
        termination's reason.

        Once this method is called, the ``server_terminated``
        attribute is set. Calling this method several times is
        safe as the closing frame will be sent only the first
        time.

        .. seealso:: Defined Status Codes http://tools.ietf.org/html/rfc6455#section-7.4.1
         N/A N/A N/A self server_terminated N/A N/A N/A self server_terminated True N/A N/A N/A self _write N/A N/A N/A N/A N/A self stream close code code reason reason single mask N/A N/A self stream always_mask N/A closed N/A N/A self code reason N/A None N/A N/A 
        Called  when the websocket stream and connection are finally closed.
        The provided ``code`` is status set by the other point and
        ``reason`` is a human readable message.

        .. seealso:: Defined Status Codes http://tools.ietf.org/html/rfc6455#section-7.4.1
         N/A N/A terminated N/A N/A self N/A N/A N/A 
        Returns ``True`` if both the client and server have been
        marked as terminated.
         N/A N/A N/A N/A self client_terminated True N/A N/A self server_terminated True N/A property connection N/A N/A self N/A N/A N/A N/A self sock N/A property close_connection N/A N/A self N/A N/A N/A 
        Shutdowns then closes the underlying connection.
         N/A N/A self sock N/A N/A N/A N/A N/A N/A N/A N/A N/A self sock shutdown N/A socket SHUT_RDWR N/A N/A N/A N/A self sock close N/A N/A N/A N/A N/A N/A N/A self sock None N/A ping N/A N/A self message N/A N/A N/A 
        Send a ping message to the remote peer.
        The given `message` must be a unicode string.
         N/A N/A N/A self send N/A PingControlMessage message N/A ponged N/A N/A self pong N/A N/A N/A 
        Pong message, as a :class:`messaging.PongControlMessage` instance,
        received on the stream.
         N/A N/A received_message N/A N/A self message N/A N/A N/A 
        Called whenever a complete ``message``, binary or text,
        is received and ready for application's processing.

        The passed message is an instance of :class:`messaging.TextMessage`
        or :class:`messaging.BinaryMessage`.

        .. note:: You should override this method in your subclass.
         N/A N/A unhandled_error N/A N/A self error N/A N/A N/A 
        Called whenever a socket, or an OS, error is trapped
        by ws4py but not managed by it. The given error is
        an instance of `socket.error` or `OSError`. 

        Note however that application exceptions will not go
        through this handler. Instead, do make sure you
        protect your code appropriately in `received_message`
        or `send`.

        The default behaviour of this handler is to log
        the error with a message.
         N/A N/A N/A logger exception Failed to receive data N/A _write N/A N/A self b N/A N/A N/A 
        Trying to prevent a write operation
        on an already closed websocket stream.

        This cannot be bullet proof but hopefully
        will catch almost all use cases.
         N/A N/A N/A self terminated N/A N/A self sock None N/A N/A N/A RuntimeError Cannot send on a terminated websocket N/A N/A N/A N/A self sock sendall b N/A send N/A N/A self payload binary N/A False N/A N/A 
        Sends the given ``payload`` out.

        If ``payload`` is some bytes or a bytearray,
        then it is sent as a single message not fragmented.

        If ``payload`` is a generator, each chunk is sent as part of
        fragmented message.

        If ``binary`` is set, handles the payload as a binary message.
         N/A message_sender N/A binary N/A N/A self stream binary_message N/A N/A self stream text_message N/A N/A N/A isinstance payload basestring N/A isinstance payload bytearray N/A N/A m N/A N/A N/A message_sender payload single mask N/A N/A self stream always_mask N/A N/A N/A self _write m N/A N/A N/A isinstance payload Message N/A N/A data N/A N/A payload single mask N/A N/A self stream always_mask N/A N/A N/A self _write data N/A N/A N/A N/A type payload N/A types GeneratorType N/A N/A bytes N/A next payload N/A first True N/A chunk payload N/A N/A N/A N/A self _write N/A N/A N/A message_sender bytes fragment first first mask N/A N/A self stream always_mask N/A bytes chunk N/A first False N/A N/A N/A self _write N/A N/A N/A message_sender bytes fragment last True mask N/A N/A self stream always_mask N/A N/A N/A ValueError N/A Unsupported type '%s' passed to send() N/A type payload N/A _get_from_pending N/A N/A self N/A N/A N/A 
        The SSL socket object provides the same interface
        as the socket interface but behaves differently.

        When data is sent over a SSL connection
        more data may be read than was requested from by 
        the ws4py websocket object.

        In that case, the data may have been indeed read 
        from the underlying real socket, but not read by the 
        application which will expect another trigger from the 
        manager's polling mechanism as if more data was still on the
        wire. This will happen only when new data is 
        sent by the other peer which means there will be
        some delay before the initial read data is handled
        by the application.

        Due to this, we have to rely on a non-public method
        to query the internal SSL socket buffer if it has indeed
        more data pending in its buffer.

        Now, some people in the Python community 
        `discourage <https://bugs.python.org/issue21430>`_
        this usage of the ``pending()`` method because it's not
        the right way of dealing with such use case. They advise
        `this approach <https://docs.python.org/dev/library/ssl.html#notes-on-non-blocking-sockets>`_
        instead. Unfortunately, this applies only if the
        application can directly control the poller which is not
        the case with the WebSocket abstraction here.

        We therefore rely on this `technic <http://stackoverflow.com/questions/3187565/select-and-ssl-in-python>`_
        which seems to be valid anyway.

        This is a bit of a shame because we have to process 
        more data than what wanted initially.
         N/A data N/A pending N/A N/A N/A self sock pending N/A pending N/A N/A data N/A N/A N/A self sock recv pending N/A pending N/A N/A N/A self sock pending N/A data N/A once N/A N/A self N/A N/A N/A 
        Performs the operation of reading from the underlying
        connection in order to feed the stream of bytes.

        We start with a small size of two bytes to be read
        from the connection so that we can quickly parse an
        incoming frame header. Then the stream indicates
        whatever size must be read from the connection since
        it knows the frame payload length.

        It returns `False` if an error occurred at the
        socket level or during the bytes processing. Otherwise,
        it returns `True`.
         N/A N/A self terminated N/A N/A N/A N/A logger debug WebSocket is already terminated N/A False N/A N/A N/A b N/A N/A N/A self sock recv N/A self reading_buffer_size N/A N/A self _is_secure N/A N/A b N/A N/A self _get_from_pending N/A N/A N/A N/A N/A socket error OSError pyOpenSSLError N/A e N/A N/A N/A N/A self unhandled_error e N/A False N/A N/A N/A N/A N/A self process b N/A N/A False N/A True N/A terminate N/A N/A self N/A N/A N/A 
        Completes the websocket by calling the `closed`
        method either using the received closing code
        and reason, or when none was received, using
        the special `1006` code.

        Finally close the underlying connection for
        good and cleanup resources by unsetting
        the `environ` and `stream` attributes.
         N/A s N/A self stream N/A N/A self client_terminated N/A self server_terminated True N/A N/A N/A N/A N/A s closing None N/A N/A N/A N/A self closed 1006 Going away N/A N/A N/A N/A self closed N/A N/A s closing code N/A N/A s closing reason N/A N/A N/A N/A self close_connection N/A N/A N/A s _cleanup N/A N/A self stream None N/A N/A self environ None N/A process N/A N/A self bytes N/A N/A N/A  Takes some bytes and process them through the
        internal stream's parser. If a message of any kind is
        found, performs one of these actions:

        * A closing message will initiate the closing handshake
        * Errors will initiate a closing handshake
        * A message will be passed to the ``received_message`` method
        * Pings will see pongs be sent automatically
        * Pongs will be passed to the ``ponged`` method

        The process should be terminated when this method
        returns ``False``.
         N/A s N/A self stream N/A N/A N/A bytes N/A N/A self reading_buffer_size 0 N/A N/A False N/A N/A self reading_buffer_size N/A N/A N/A N/A s parser send bytes DEFAULT_READING_SIZE N/A N/A N/A s closing None N/A N/A N/A N/A logger debug N/A Closing message received (%d) '%s' N/A N/A N/A s closing code N/A N/A s closing reason N/A N/A N/A self server_terminated N/A N/A N/A N/A self close N/A N/A s closing code N/A N/A s closing reason N/A N/A N/A self client_terminated True N/A False N/A N/A s errors N/A N/A error N/A s errors N/A N/A N/A N/A logger debug N/A Error message received (%d) '%s' N/A N/A error code N/A error reason N/A N/A N/A self close N/A error code N/A error reason N/A N/A s errors N/A N/A False N/A N/A s has_message N/A N/A N/A N/A self received_message N/A s message N/A N/A N/A s message None N/A N/A N/A N/A s message data None N/A N/A s message None N/A True N/A N/A s pings N/A N/A ping N/A s pings N/A N/A N/A N/A self _write N/A N/A s pong N/A ping data N/A N/A s pings N/A N/A N/A s pongs N/A N/A pong N/A s pongs N/A N/A N/A N/A self ponged pong N/A N/A s pongs N/A N/A True N/A run N/A N/A self N/A N/A N/A 
        Performs the operation of reading from the underlying
        connection in order to feed the stream of bytes.

        We start with a small size of two bytes to be read
        from the connection so that we can quickly parse an
        incoming frame header. Then the stream indicates
        whatever size must be read from the connection since
        it knows the frame payload length.

        Note that we perform some automatic opererations:

        * On a closing message, we respond with a closing
          message and finally close the connection
        * We respond to pings with pong messages.
        * Whenever an error is raised by the stream parsing,
          we initiate the closing of the connection with the
          appropiate error code.

        This method is blocking and should likely be run
        in a thread.
         N/A N/A N/A N/A self sock setblocking True N/A N/A Heartbeat self frequency N/A self heartbeat_freq N/A N/A s N/A self stream N/A N/A N/A N/A N/A self opened N/A N/A N/A self terminated N/A N/A N/A N/A N/A self once N/A N/A N/A N/A N/A N/A self terminate N/A N/A EchoWebSocket N/A WebSocket N/A received_message N/A N/A self message N/A N/A N/A 
        Automatically sends back the provided ``message`` to
        its originating endpoint.
         N/A N/A N/A self send N/A message data N/A message is_binary N/A N/A