精选优质文档-倾情为你奉上北邮计算机网络课程设计 DNS 服务器1 环境操作系统随意,语言 python2.72. 文件Socket.py 说明 完成缓存检测,确定是回应,还是转发,如果是回应,确定是本地回 应还是外部应答转发import socketimport mydicimport charhandleimport makeframes = socket.socket(socket.AF_INET, socket.SOCK_DGRAMport = 53the_dic = mydic.get_web_ip(client_request = client_request_index = reverse_map = key_record = 0client_wait = s.bind(,porttime_rest = 0request_general = print runningwhile True:try:msg , (client,port = s