Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

how to set timeout when send a message? #105

Closed
didapinchegit opened this issue Oct 23, 2015 · 1 comment
Closed

how to set timeout when send a message? #105

didapinchegit opened this issue Oct 23, 2015 · 1 comment

Comments

@didapinchegit
Copy link

No description provided.

@dmcgowan
Copy link
Contributor

Libchan currently does not ack messages. If you are building an application that needs acknowledgement when messages are received the best way to do that with libchan is to send a Sender along with your messages and have the remote end acknowledge by closing or sending an ack message on that channel. To timeout the caller would be responsible for timing out if no ack is received within a desired timeout window. Let me know if you need help with this pattern, I am glad to help out.

For the future of libchan, I am considering allowing fully synchronized channels which would require acks and potential timeouts. That would take some more thought into the libchan interface though which is designed to be simple message transport more like udp than tcp. A related issue #91

Closing this issue, thanks for your interest in libchan!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants