(self, sock, protocols=None, extensions=None, environ=None, heartbeat_freq=None)
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.
The ``sock`` is an opened connection
        resulting from the websocket handshake.
The sock is an opened connection resulting from the websocket handshake .
def __init__(self, sock, protocols=None, extensions=None, environ=None, heartbeat_freq=None):
        """ 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.
        """

        self.stream = Stream(always_mask=False)
        """
        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``.
        """

        self.protocols = protocols
        """
        List of protocols supported by this endpoint.
        Unused for now.
        """

        self.extensions = extensions
        """
        List of extensions supported by this endpoint.
        Unused for now.
        """

        self.sock = sock
        """
        Underlying connection.
        """

        self.client_terminated = False
        """
        Indicates if the client has been marked as terminated.
        """

        self.server_terminated = False
        """
        Indicates if the server has been marked as terminated.
        """

        self.reading_buffer_size = DEFAULT_READING_SIZE
        """
        Current connection reading buffer size.
        """

        self.environ = environ
        """
        WSGI environ dictionary.
        """

        self.heartbeat_freq = heartbeat_freq
        """
        At which interval the heartbeat will be running.
        Set this to `0` or `None` to disable it entirely.
        """

        self._local_address = None
        self._peer_address = None
def __init__ ( self , sock , protocols = None , extensions = None , environ = None , heartbeat_freq = None ) : self . stream = Stream ( always_mask = False ) """
        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``.
        """ self . protocols = protocols """
        List of protocols supported by this endpoint.
        Unused for now.
        """ self . extensions = extensions """
        List of extensions supported by this endpoint.
        Unused for now.
        """ self . sock = sock """
        Underlying connection.
        """ self . client_terminated = False """
        Indicates if the client has been marked as terminated.
        """ self . server_terminated = False """
        Indicates if the server has been marked as terminated.
        """ self . reading_buffer_size = DEFAULT_READING_SIZE """
        Current connection reading buffer size.
        """ self . environ = environ """
        WSGI environ dictionary.
        """ self . heartbeat_freq = heartbeat_freq """
        At which interval the heartbeat will be running.
        Set this to `0` or `None` to disable it entirely.
        """ self . _local_address = None self . _peer_address = None