This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 初始化tcp / init tcp | |
import socket | |
import re | |
import os | |
import time | |
import gevent | |
home_dir = 'folder_for_http_server' # 设置工作目录/Set working directory | |
head = 'HTTP/1.1 200 OK \nServer: Python \nConnection:close \n Content-Length:200\t\n\n' | |
head404 = 'HTTP/1.1 404 NOT Found \nServer: Python \nConnection:close \n Content-Length:200\t\n\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
''' | |
@author Karblue | |
@date 2016年2月27日 | |
''' | |
import struct | |
import uuid | |
import copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
''' | |
@author Karblue | |
@date 2016年2月27日 | |
''' | |
import struct | |
import uuid | |
import copy |