import socket import gevent import sys from gevent import monkey import re monkey.patch_all() class HTTP_server(object): def __init__(self,port): self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, True) self.server_socket.bind(("", port)) self.server_socket.listen(128) def run(self): while True: new_socket, addr = self.server_socket.accept() gevent.spawn(
python 关于从cmd打开.py 浏览器页面显示数据(封装)
最新推荐文章于 2024-10-09 20:18:29 发布