Did I find the right examples for you? yes no

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

src/k/a/kaylee-HEAD/kaylee/server.py   kaylee(Download)
import zmq.green as zmq
from collections import defaultdict
from utils import zmq_addr
 
try:
    def connect(self, push_addr=None, pull_addr=None, control_addr=None):
        c = zmq.Context()
 
        # Pull tasks across manager
        pull_addr = zmq_addr(6666, transport='tcp')
 
        self.pull_socket = c.socket(zmq.PULL)
        self.pull_socket.bind(pull_addr)
 
        push_addr = zmq_addr(5555, transport='tcp')
        self.push_socket.bind(push_addr)
 
        ctrl_addr = zmq_addr(7777, transport='tcp')
 
        self.ctrl_socket = c.socket(zmq.ROUTER)

src/k/a/kaylee-HEAD/kaylee/client.py   kaylee(Download)
from itertools import imap
from collections import deque
from utils import zmq_addr
 
import zmq.green as zmq
 
        if not pull_addr:
            addr = zmq_addr(5555, transport='tcp')
 
        self.pull_socket = c.socket(zmq.PULL)
        self.pull_socket.connect(addr)
 
        if not push_addr:
            addr = zmq_addr(6666, transport='tcp')
 
        if not ctrl_addr:
            addr = zmq_addr(7777, transport='tcp')
 
        self.ctrl_socket = c.socket(zmq.ROUTER)