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

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/j/u/junction-HEAD/junction/hub.py   junction(Download)
    def add_peer(self, peer_addr):
        "Build a connection to the Hub at a given ``(host, port)`` address"
        peer = connection.Peer(
                self._ident, self._dispatcher, peer_addr, backend.Socket())
        peer.start()
    def _listener(self):
        server = backend.Socket()
        server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 
        server.bind(self.addr)
    def _udp_listener(self):
        sock = backend.Socket(socket.AF_INET, socket.SOCK_DGRAM)
        sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        sock.bind(self.addr)
 

src/j/u/junction-2.0.0/junction/hub.py   junction(Download)
    def add_peer(self, peer_addr):
        "Build a connection to the Hub at a given ``(host, port)`` address"
        peer = connection.Peer(
                self._ident, self._dispatcher, peer_addr, backend.Socket())
        peer.start()
    def _listener(self):
        server = backend.Socket()
        server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 
        server.bind(self.addr)

src/j/u/junction-2.0.0/junction/client.py   junction(Download)
        self._peer = connection.Peer(
                None, self._dispatcher, self._addrs.popleft(),
                backend.Socket(), reconnect=False)
        self._peer.start()
 

src/j/u/junction-HEAD/junction/client.py   junction(Download)
        self._peer = connection.Peer(
                None, self._dispatcher, self._addrs.popleft(),
                backend.Socket(), reconnect=False)
        self._peer.start()