(self, always_mask=False, expect_masking=True)
Represents a websocket stream of bytes flowing in and out.

        The stream doesn't know about the data provider itself and
        doesn't even know about sockets. Instead the stream simply
        yields for more bytes whenever it requires them. The stream owner
        is responsible to provide the stream with those bytes until
        a frame can be interpreted.

        .. code-block:: python
           :linenos:

           >>> s = Stream()
           >>> s.parser.send(BYTES)
           >>> s.has_messages
           False
           >>> s.parser.send(MORE_BYTES)
           >>> s.has_messages
           True
           >>> s.message
           <TextMessage ... >

        Set ``always_mask`` to mask all frames built.

        Set ``expect_masking`` to indicate masking will be
        checked on all parsed frames.
Represents a websocket stream of bytes flowing in and out.
Represents a websocket stream of bytes flowing in and out .
def __init__(self, always_mask=False, expect_masking=True):
        """ Represents a websocket stream of bytes flowing in and out.

        The stream doesn't know about the data provider itself and
        doesn't even know about sockets. Instead the stream simply
        yields for more bytes whenever it requires them. The stream owner
        is responsible to provide the stream with those bytes until
        a frame can be interpreted.

        .. code-block:: python
           :linenos:

           >>> s = Stream()
           >>> s.parser.send(BYTES)
           >>> s.has_messages
           False
           >>> s.parser.send(MORE_BYTES)
           >>> s.has_messages
           True
           >>> s.message
           <TextMessage ... >

        Set ``always_mask`` to mask all frames built.

        Set ``expect_masking`` to indicate masking will be
        checked on all parsed frames.
        """

        self.message = None
        """
        Parsed test or binary messages. Whenever the parser
        reads more bytes from a fragment message, those bytes
        are appended to the most recent message.
        """

        self.pings = []
        """
        Parsed ping control messages. They are instances of
        :class:`ws4py.messaging.PingControlMessage`
        """

        self.pongs = []
        """
        Parsed pong control messages. They are instances of
        :class:`ws4py.messaging.PongControlMessage`
        """

        self.closing = None
        """
        Parsed close control messsage. Instance of
        :class:`ws4py.messaging.CloseControlMessage`
        """

        self.errors = []
        """
        Detected errors while parsing. Instances of
        :class:`ws4py.messaging.CloseControlMessage`
        """

        self._parser = None
        """
        Parser in charge to process bytes it is fed with.
        """

        self.always_mask = always_mask
        self.expect_masking = expect_masking
def __init__ ( self , always_mask = False , expect_masking = True ) : self . message = None """
        Parsed test or binary messages. Whenever the parser
        reads more bytes from a fragment message, those bytes
        are appended to the most recent message.
        """ self . pings = [ ] """
        Parsed ping control messages. They are instances of
        :class:`ws4py.messaging.PingControlMessage`
        """ self . pongs = [ ] """
        Parsed pong control messages. They are instances of
        :class:`ws4py.messaging.PongControlMessage`
        """ self . closing = None """
        Parsed close control messsage. Instance of
        :class:`ws4py.messaging.CloseControlMessage`
        """ self . errors = [ ] """
        Detected errors while parsing. Instances of
        :class:`ws4py.messaging.CloseControlMessage`
        """ self . _parser = None """
        Parser in charge to process bytes it is fed with.
        """ self . always_mask = always_mask self . expect_masking = expect_masking