Home
Ratchet Library :: API Reference
API  ·  Manual

Module ratchet.bus.transaction

After a request has been sent or received by the client- or server-side, respectively, of a message bus, the first returned value is a transaction object, defined by this module. A transaction object cannot be created directly, it is presented as a module for documentation purposes only.

Functions

recv_response (self) Receives a response from the server-side of a message bus.
send_response (self, response) Sends a response back to the client-side of a message bus, after a request was received fro that client.


Functions

recv_response (self)
Receives a response from the server-side of a message bus. This function is available from transactions returned by recv_response().

Parameters

  • self: a transaction object returned by send_request().

Return value:

the response from the server-side message bus.
send_response (self, response)
Sends a response back to the client-side of a message bus, after a request was received fro that client. Information about the client's connection is available in the "from" index of the transaction object, if the bus is socket-based. This function is available from transactions returned by recv_request().

Parameters

  • self: a transaction object returned by recv_request().
  • response: a response object to send.