def data_received(data):
    " TelnetProtocolParser 'data_received' callback "
    assert isinstance(data, binary_type)
    try:
        result = stdin_decoder[0].decode(data)
        inputstream.feed(result)
    except UnicodeDecodeError:
        stdin_decoder[0] = stdin_decoder_cls()
        return ''
TelnetProtocolParser 'data_received' callback
def data_received(data):
    "  "
    assert isinstance(data, binary_type)
    try:
        result = stdin_decoder[0].decode(data)
        inputstream.feed(result)
    except UnicodeDecodeError:
        stdin_decoder[0] = stdin_decoder_cls()
        return 