Skip to content

How to impl a request-response-acknowledge protocol with tokio-tower? #41

@matthiasbeyer

Description

@matthiasbeyer

Hi,

I have a protocol that expects me to send an "Acknowledge" message after I received a "response".

I successfully implemented a server part, where a client connects and messages are handled successfully:

  • Client sends "connect"
  • Server sends "Connect Response"
  • Client sends "Connect Response Acknowledge"

Right now, we do nothing with the acknowledge. We just drop the message. We do not even verify that the acknowledge can be associated with a prior "response" (operation IDs and such are not verified).

Now I need to implement a request-response-acknowledge flow where the server initiates the request on an existing connection (aka. the "remote" part initiated the connection):

  • Server sends some "Get" message
  • Client sends "Get Response" message
  • Server sends "Get Response Acknowledge" message

My questions:

  • Is this even the right crate to implement this with?
  • How to implement said behavior? What are the interfaces I want to look at? I feel like the Client types are not what I want, do I?

Unfortunately, I cannot share the code I am working on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions