 
   @doc """
   Sends receives an error from the transaction.
+
+  The function `receive_error/2` is called from the client or server
+  transaction process created when sending or receiving requests.
   """
   @callback receive_error(reason :: term,
                           client_or_server_transaction ::


  @doc """
  Receives a response for a sent request.
  """
  @callback receive_response(incoming_response :: Message.response,
                             client_transaction :: Transaction.Client.t | nil)

  @doc """
  Receives a new incoming request from a remote host, or ACK.

  The `server_transaction` indicates the name of the transaction created when
  the request was received. If it is an ACK, then the `server_transaction` is
  `nil`.

  The function `receive_request/2` is called from the server transaction
  process when the parameter `server_transaction` is not `nil`, and from the
  transport process (possibly a `poolboy` worker process), when the
  `server_transaction` is `nil`.
  """
  @callback receive_request(incoming_request :: Message.request,
                            server_transaction :: Transaction.Server.t | nil)
