摘要: 一、每个机器上有65535个端口 1-1024,用来保留作为一些标准的服务端口。 二、socket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄,应用程序通常通过“套接字”向网络发出请求或者应答网络请求。 socket起源于Unix,而Unix/Linux基本哲学之一就是“一切皆文 阅读全文
posted @ 2018-11-04 18:49 Presley 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 # 作者:Presley 4 # 邮箱:1209989516@qq.com 5 # 时间:2018-11-04 6 # 反射使用 7 import sys 8 class WebServer(object): 9 def __init__(self,host,port)... 阅读全文
posted @ 2018-11-04 12:18 Presley 阅读(193) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- # 作者:Presley # 邮箱:1209989516@qq.com # 时间:2018-11-04 # python内置方法 class A: n = "A" def f2(self): print("from A") class B(A): n = "B" ... 阅读全文
posted @ 2018-11-04 10:57 Presley 阅读(305) 评论(0) 推荐(0) 编辑