[原创] python udt4 for windows sendfile.py
#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)
联系方式:heshengjun@tinywsn.com