def write_chunk(to, data):
    """ send a chunk encoded """
    chunk = "".join(("%X\r\n" % len(data), data, "\r\n"))
    to.writeall(chunk)
dataset/ETHPy150Open benoitc/hroute/hroute/util.py/write_chunk/original