[原創] python udt4 for windows sendfile.py
阿新 • • 發佈:2017-10-13
sendfile https truct utf-8 win sock ref pri client
#coding: utf-8 import ctypes as _ctypes from ctypes import wintypes as _wtypes import threading import time import struct import os from udt4py import * fd = udt_socket() ret = udt_bind(fd,9000) if ret < 0: print("bind failed") os._exit(0) ret = udt_listen(fd) if ret < 0: print("listen failed") os._exit(0) print("listen 9000") while True: (clientfd,clienthost,clientservice) = udt_accept(fd) if clientfd >=0 : print(clienthost,clientservice) udt_sendfile(clientfd)
udt4py下載
[原創] python udt4 for windows sendfile.py