Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(6)  |  Derive(0)  |  Import(3)

src/f/l/flashproxy-HEAD/flashproxy/fac.py   flashproxy(Download)
 
from flashproxy import reg
from flashproxy.util import parse_addr_spec, format_addr
 
DEFAULT_CLIENT_TRANSPORT = "websocket"
    "websocket" or "obfs3|websocket"."""
    f = fac_socket(facilitator_addr)
    params = [("CLIENT", format_addr(client_addr))]
    params.append(("TRANSPORT", transport))
    try:
 
    try:
        command, params = transact(f, "GET", ("FROM", format_addr(proxy_addr)), *transports)
    finally:
        f.close()
        client = parse_addr_spec(client_spec)
        relay = parse_addr_spec(relay_spec)
        response["client"] = format_addr(client)
        response["client-transport"] = client_transport
        response["relay"] = format_addr(relay)

src/f/l/flashproxy-HEAD/flashproxy/test/test_util.py   flashproxy(Download)
import unittest
 
from flashproxy.util import parse_addr_spec, canonical_ip, addr_family, format_addr
 
class ParseAddrSpecTest(unittest.TestCase):

src/f/l/flashproxy-HEAD/facilitator/facilitator-test.py   flashproxy(Download)
from flashproxy import fac
from flashproxy.reg import Transport, Endpoint
from flashproxy.util import format_addr
 
# Import the facilitator program as a module.
    def setUp(self):
        self.relay_file = tempfile.NamedTemporaryFile()
        self.relay_file.write("%s %s\n" % (RELAY_TP, format_addr(self.IPV4_RELAY_ADDR)))
        self.relay_file.write("%s %s\n" % (RELAY_TP, format_addr(self.IPV6_RELAY_ADDR)))
        self.relay_file.flush()