def configure(port, proxy_port, pipes):
"""Starts a UDP proxy server on localhost.
Returns the proxy port number, which is the same as the proxy_port param
unless zero is passed in.
"""
server = ProxyServer(port, pipes)
port = reactor.listenUDP(proxy_port, server.udp)
return port.getHost().port
评论列表
文章目录