def read_line_from_socket(caller):
    """
    Given a connection, read a single "line"
    ending in a newline char
    """
    line = ""
    buf = caller.cnxn.recv(64)
    while(len(buf) > 0 and '\n' not in buf):
        line += buf.decode()
        buf = caller.cnxn.recv(64)
    line = (line + buf.decode())
    line = line.replace('\n', '')
    line = line.replace('\r', '')
    return line