grpc / grpc/grpc.io

Asynchronous Callback API Tutorial

Open
#1,407 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
479
Forks
545
Avg merge
2d 7h
Merged PRs (30d)
5

Description

Section Server-side streaming RPC, Server, description of ListFeatures implementation: The description of activities performed in ListFeatures constructor is wrong. It describes collecting features into features_to_send_, which does not exist in code. In the same manner, the next paragraph describing OnWriteDone() is wrong: "we continue to send the next Feature until features_to_send_ is empty".
Instead the description should be like this:
The ServerWriteReactor's constructor is called when ListFeatures() constructs and provides the reactor in response to the started RPC. It obtains a pointer to the global feature_list_, and starts sending features through a call to NextWrite(). This method scans the list of features for a matching entry, and starts its transmission through a call to StartWrite().
OnWriteDone() reacts to write completion. If the write was done successfully, we continue to send the next feature through a call to NextWrite(). When the whole collection of features is scanned (i.e. all relevant features have been sent), the NextWrite() method calls Finish(Status::OK) to finish the RPC.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.