Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/w/s/wstunnel-0.0.3/wstunnel/test/test_wstunnel.py   wstunnel(Download)
from wstunnel.filters import DumpFilter, FilterException
from wstunnel.test import EchoServer, EchoClient, RaiseFromWSFilter, RaiseToWSFilter
from wstunnel.client import WSTunnelClient, WebSocketProxy
from wstunnel.server import WSTunnelServer
from wstunnel.toolbox import hex_dump, random_free_port
    def test_no_ws_endpoint(self):
        """
        Tests the client tunnel endpoint behaviour when there's no server counterpart
        """
        clt_tun = WSTunnelClient(family=socket.AF_INET,
        srv_tun = WSTunnelServer(0, io_loop=self.io_loop, proxies={"/test": ("127.0.0.1", random_free_port())})
        srv_tun.start()
        clt_tun = WSTunnelClient(io_loop=self.io_loop)
        clt_tun.add_proxy("test", WebSocketProxy(port=0,
                                                 ws_url="ws://localhost:{0}/test".format(srv_tun.port)))
    def test_no_client_ws_options(self):
        """
        Tests the client tunnel endpoint behaviour when there's no server counterpart
        """
        clt_tun = WSTunnelClient(family=socket.AF_INET,
                                      proxies={"/test": self.srv.address_list[0]}, io_loop=self.io_loop)
        self.srv_tun.start()
        self.clt_tun = WSTunnelClient(proxies={0: "ws://localhost:{0}/test".format(self.srv_tun.port)},
                                      address=self.srv_tun.address,
                                      family=socket.AF_INET,

src/w/s/wstunnel-0.0.3/wstunnel/factory.py   wstunnel(Download)
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
from wstunnel import join_url
from wstunnel.client import WSTunnelClient, WebSocketProxy
from wstunnel.server import WSTunnelServer
from wstunnel.toolbox import address_to_tuple
    """
    ws_url = config["ws_url"]
    srv = WSTunnelClient()
    proxies = config["proxies"]
    for resource, settings in proxies.items():