+ #include <simgrid/comm.h>
+
+ .. doxygentypedef:: sg_comm_t
+
+Querying info
+-------------
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. doxygenfunction:: simgrid::s4u::Comm::get_dst_data_size() const
+ .. doxygenfunction:: simgrid::s4u::Comm::get_mailbox() const
+ .. doxygenfunction:: simgrid::s4u::Comm::get_sender() const
+ .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff, size_t size)
+ .. doxygenfunction:: simgrid::s4u::Comm::detach()
+ .. doxygenfunction:: simgrid::s4u::Comm::detach(const std::function<void(void*)>& clean_function)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_payload_size(uint64_t bytes)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_rate(double rate)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff, size_t size)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_src_data_size(size_t size)
+
+ .. group-tab:: Python
+
+ .. autoattribute:: simgrid.Comm.dst_data_size
+ .. autoattribute:: simgrid.Comm.mailbox
+ .. autoattribute:: simgrid.Comm.sender
+ .. autoattribute:: simgrid.Comm.state_str
+ .. automethod:: simgrid.Comm.detach
+ .. automethod:: simgrid.Comm.set_payload_size
+ .. automethod:: simgrid.Comm.set_rate
+
+Direct host-to-host communication
+---------------------------------
+
+Most communications are created using :ref:`s4u_mailbox`, but you can
+also start direct communications as shown below. See also the
+:ref:`relevant examples <s4u_ex_comm_host2host>`.
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. doxygenfunction:: simgrid::s4u::Comm::sendto
+ .. doxygenfunction:: simgrid::s4u::Comm::sendto_init()
+ .. doxygenfunction:: simgrid::s4u::Comm::sendto_init(Host *from, Host *to)
+ .. doxygenfunction:: simgrid::s4u::Comm::sendto_async
+
+ .. group-tab:: Python
+
+ .. automethod:: simgrid.Comm.sendto
+ .. automethod:: simgrid.Comm.sendto_init
+ .. automethod:: simgrid.Comm.sendto_async
+
+Life cycle
+----------
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. doxygenfunction:: simgrid::s4u::Comm::cancel
+ .. doxygenfunction:: simgrid::s4u::Comm::start
+ .. doxygenfunction:: simgrid::s4u::Comm::test
+ .. doxygenfunction:: simgrid::s4u::Comm::test_any(const std::vector< CommPtr >& comms)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_all(const std::vector< CommPtr >& comms)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_all_for(const std::vector< CommPtr >& comms, double timeout)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_any(const std::vector< CommPtr >& comms)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_any_for(const std::vector< CommPtr >& comms, double timeout)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_for
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_until
+
+ .. group-tab:: Python
+
+ .. automethod:: simgrid.Comm.cancel
+ .. automethod:: simgrid.Comm.start
+ .. automethod:: simgrid.Comm.test
+ .. automethod:: simgrid.Comm.test_any
+ .. automethod:: simgrid.Comm.wait
+ .. automethod:: simgrid.Comm.wait_for
+ .. automethod:: simgrid.Comm.wait_all
+ .. automethod:: simgrid.Comm.wait_all_for
+ .. automethod:: simgrid.Comm.wait_any
+ .. automethod:: simgrid.Comm.wait_any_for
+ .. automethod:: simgrid.Comm.wait_until
+
+ .. group-tab:: C
+
+ .. doxygenfunction:: sg_comm_test
+ .. doxygenfunction:: sg_comm_wait
+ .. doxygenfunction:: sg_comm_wait_all
+ .. doxygenfunction:: sg_comm_wait_any
+
+Suspending and resuming a communication
+---------------------------------------
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. doxygenfunction:: simgrid::s4u::Comm::suspend
+ .. doxygenfunction:: simgrid::s4u::Comm::resume
+ .. doxygenfunction:: simgrid::s4u::Comm::is_suspended
+
+ .. group-tab:: Python
+
+ .. automethod:: simgrid.Comm.suspend
+ .. automethod:: simgrid.Comm.resume
+ .. autoattribute:: simgrid.Comm.is_suspended
+
+Signals
+-------
+
+.. tabs::
+
+ .. group-tab:: C++
+
+ .. doxygenfunction:: simgrid::s4u::Comm::on_start_cb
+ .. doxygenfunction:: simgrid::s4u::Comm::on_this_start_cb
+ .. doxygenfunction:: simgrid::s4u::Comm::on_completion_cb
+ .. doxygenfunction:: simgrid::s4u::Comm::on_this_completion_cb
+ .. doxygenfunction:: simgrid::s4u::Comm::on_recv_cb
+ .. doxygenfunction:: simgrid::s4u::Comm::on_send_cb
+ .. doxygenfunction:: simgrid::s4u::Comm::on_suspended_cb
+ .. doxygenfunction:: simgrid::s4u::Comm::on_resumed_cb
+ .. doxygenfunction:: simgrid::s4u::Comm::on_veto_cb