Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

examples: Add example for server_send_stream #272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

teawater
Copy link
Collaborator

@teawater teawater commented Jan 9, 2025

Add example for server_send_stream to show server how to use stream send data to client.

Add example for server_send_stream to show server how to use stream send
data to client.

Signed-off-by: Hui Zhu <teawater@antgroup.com>
) -> ::ttrpc::Result<()> {
let mut seq = 0;
while seq < 10 {
sleep(std::time::Duration::from_secs(1)).await;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sleep 1 sec is too long to an example in my opinion. How about using 100ms instead? thanks.

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

Successfully merging this pull request may close these issues.

2 participants