##// END OF EJS Templates
Use modern pyzmq attribute cleverness
Thomas Kluyver -
Show More
@@ -32,22 +32,22 b' class InvalidPortNumber(Exception):'
32 32 def make_shell_socket(context, identity, address):
33 33 socket = context.socket(zmq.DEALER)
34 34 socket.linger = 1000
35 socket.setsockopt(zmq.IDENTITY, identity)
35 socket.identity = identity
36 36 socket.connect(address)
37 37 return socket
38 38
39 39 def make_iopub_socket(context, identity, address):
40 40 socket = context.socket(zmq.SUB)
41 41 socket.linger = 1000
42 socket.setsockopt(zmq.SUBSCRIBE,b'')
43 socket.setsockopt(zmq.IDENTITY, identity)
42 socket.subscribe = b''
43 socket.identity = identity
44 44 socket.connect(address)
45 45 return socket
46 46
47 47 def make_stdin_socket(context, identity, address):
48 48 socket = context.socket(zmq.DEALER)
49 49 socket.linger = 1000
50 socket.setsockopt(zmq.IDENTITY, identity)
50 socket.identity = identity
51 51 socket.connect(address)
52 52 return socket
53 53
General Comments 0
You need to be logged in to leave comments. Login now