关闭与远端的连接.

        判断标志位closed是否为False,如果是则关闭,否则不进行操作

def close(self):
        """关闭与远端的连接.

        判断标志位closed是否为False,如果是则关闭,否则不进行操作

        """
        if self.closed is False:
            self.clean()
            try:
                self.writer.write_eof()
            except:
                pass
            self.writer.close()
            self.closed = True
            if self.debug is True:
                print('close')
        if self.debug is True:
            print("closed")