Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
matthiasbeyer opened this issue Nov 13, 2023 · 0 comments

Comments

@matthiasbeyer
Copy link

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant