0MQ Socket pure Python methods.
Bind this socket to a random port in a range.
Parameters : | addr : str
min_port : int, optional
max_port : int, optional
max_tries : int, optional
|
---|---|
Returns : | port : int
|
Raises : | ZMQBindError :
|
Get the value of a socket option.
See the 0MQ documentation for details on specific options.
Parameters : | option : int
|
---|---|
Returns : | optval : unicode string (unicode on py2, str on py3)
|
Poll the socket for events. The default is to poll forever for incoming events. Timeout is in milliseconds, if specified.
Parameters : | timeout : int [default: None]
flags : bitfield (int) [default: POLLIN]
|
---|---|
Returns : | events : bitfield (int)
|
Receive a Python object as a message using json to serialize.
Parameters : | flags : int
|
---|---|
Returns : | obj : Python object
|
Receive a multipart message as a list of bytes or Frame objects.
Parameters : | flags : int, optional
copy : bool, optional
track : bool, optional
Returns : ——- : msg_parts : list
|
---|
Receive a Python object as a message using pickle to serialize.
Parameters : | flags : int
|
---|---|
Returns : | obj : Python object
|
Receive a unicode string, as sent by send_string.
Parameters : | flags : int
encoding : str [default: ‘utf-8’]
|
---|---|
Returns : | s : unicode string (unicode on py2, str on py3)
|
Send a Python object as a message using json to serialize.
Parameters : | obj : Python object
flags : int
|
---|
Send a sequence of buffers as a multipart message.
Parameters : | msg_parts : iterable
flags : int, optional
copy : bool, optional
track : bool, optional
|
---|---|
Returns : | None : if copy or not track MessageTracker : if track and not copy
|
Send a Python object as a message using pickle to serialize.
Parameters : | obj : Python object
flags : int
protocol : int
|
---|
Send a Python unicode string as a message with an encoding.
0MQ communicates with raw bytes, so you must encode/decode text (unicode on py2, str on py3) around 0MQ.
Parameters : | u : Python unicode string (unicode on py2, str on py3)
flags : int, optional
encoding : str [default: ‘utf-8’]
|
---|
Set socket options with a unicode object it is simply a wrapper for setsockopt to protect from encoding ambiguity.
See the 0MQ documentation for details on specific options.
Parameters : | option : int
optval : unicode string (unicode on py2, str on py3)
encoding : str
|
---|
Set socket options with a unicode object it is simply a wrapper for setsockopt to protect from encoding ambiguity.
See the 0MQ documentation for details on specific options.
Parameters : | option : int
optval : unicode string (unicode on py2, str on py3)
encoding : str
|
---|