'If your subclass receives a stream instead of discrete messages, this
method can parse out individual messages and call _recv_msg() when
it has full messages.'

def _rx_raw(self, data):

    if (len(data) == 0):
        return
    if (len(self._buf) == 0):
        if data[0].isspace():
            self._buf = data.lstrip()
        else:
            self._buf = data
    else:
        self._buf += data
    while (len(self._buf) > 0):
        try:
            (msg, l) = defaultDecoder.raw_decode(self._buf)
        except:
            return
        self._buf = self._buf[l:]
        if ((len(self._buf) != 0) and self._buf[0].isspace()):
            self._buf = self._buf.lstrip()
        self._rx_message(msg)
