@asyncio.coroutine<EOL><INDENT>def client_connected_callback(self, reader, writer):<DEDENT>
peer = writer.get_extra_info('<STR_LIT>')<EOL>clients.append((reader, writer, peer))<EOL>log.info("<STR_LIT>", peer[<NUM_LIT:0>], peer[<NUM_LIT:1>])<EOL>try:<EOL><INDENT>while True:<EOL><INDENT>data = yield from reader.readline()<EOL>if not data:<EOL><INDENT>break<EOL><DEDENT>try:<EOL><INDENT>line = data.decode().strip()<EOL><DEDENT>except UnicodeDecodeError:<EOL><INDENT>line = '<STR_LIT:\x00>'<EOL><DEDENT>if line[-<NUM_LIT:1>] != DELIM:<EOL><INDENT>line = line + DELIM<EOL><DEDENT>if valid_packet(line):<EOL><INDENT>yield from self.handle_raw_tx_packet(writer, line)<EOL><DEDENT>else:<EOL><INDENT>log.warning("<STR_LIT>", peer[<NUM_LIT:0>], peer[<NUM_LIT:1>], line)<EOL>pass<EOL><DEDENT><DEDENT><DEDENT>except ConnectionResetError:<EOL><INDENT>pass<EOL><DEDENT>except Exception as e:<EOL><INDENT>log.exception(e)<EOL><DEDENT>log.info("<STR_LIT>", peer[<NUM_LIT:0>], peer[<NUM_LIT:1>])<EOL>writer.close()<EOL>clients.remove((reader, writer, peer))<EOL>
Handle connected client.