Warning

This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: kernel.blocking.channels

Blocking channels

Useful for test suites and blocking terminal interfaces.

1 Class

class IPython.kernel.blocking.channels.ZMQSocketChannel(socket, session, loop=None)

Bases: object

A ZMQ socket in a simple blocking API

__init__(socket, session, loop=None)

Create a channel.

Parameters:

socket : zmq.Socket

The ZMQ socket to use.

session : session.Session

The session to use.

loop

Unused here, for other implementations

get_msg(block=True, timeout=None)

Gets a message if there is one that is ready.

get_msgs()

Get all messages that are currently ready.

msg_ready()

Is there a message that has been received?

send(msg)

Pass a message to the ZMQ socket to send