class_docstr: A utility class to register callbacks when a zmq socket sends and receives
  
  For use with tornado IOLoop.
  
  There are three main methods
  
  Methods:
  
  * **on_recv(callback, copy=True):**
      register a callback to be run every time the socket has something to receive
  * **on_send(callback):**
      register a callback to be run every time you call send
  * **send_multipart(self, msg, flags=0, copy=False, callback=None):**
      perform a send that will trigger the callback
      if callback is passed, on_send is also called.
  
      There are also send_multipart(), send_json(), send_pyobj()
  
  Three other methods for deactivating the callbacks:
  
  * **stop_on_recv():**
      turn off the recv callback
  * **stop_on_send():**
      turn off the send callback
  
  which simply call ``on_<evt>(None)``.
  
  The entire socket interface, excluding direct recv methods, is also
  provided, primarily through direct-linking the methods.
  e.g.
  
  >>> stream.bind is stream.socket.bind
  True
  
  
  .. versionadded:: 25
  
      send/recv callbacks can be coroutines.
  
  .. versionchanged:: 25
  
      ZMQStreams only support base zmq.Socket classes (this has always been true, but not enforced).
      If ZMQStreams are created with e.g. async Socket subclasses,
      a RuntimeWarning will be shown,
      and the socket cast back to the default zmq.Socket
      before connecting events.
  
      Previously, using async sockets (or any zmq.Socket subclass) would result in undefined behavior for the
      arguments passed to callback functions.
      Now, the callback functions reliably get the return value of the base `zmq.Socket` send/recv_multipart methods
      (the list of message frames).
docstr: Returns True if we are currently receiving from the stream.
docstr_tok: ["Returns","True","if","we","are","currently","receiving","from","the","stream","."]
code: def receiving(self) -> bool:
      """Returns True if we are currently receiving from the stream."""
      return self._recv_callback is not None
  
imports: import asyncio
  import pickle
  import warnings
  from queue import Queue
  from typing import Any, Awaitable, Callable, List, Optional, Sequence, Union, cast, overload
  from tornado.ioloop import IOLoop
  from tornado.log import gen_log
  import zmq
  import zmq._future
  from zmq import POLLIN, POLLOUT
  from zmq._typing import Literal
  from zmq.utils import jsonapi
label_desc: Use image node_id 27 for calling the ZMQStream obj's underlying member method code with example usage: obj.receiving() and returns: unknown