Skip to content

Instantly share code, notes, and snippets.

@daneshk
Last active August 18, 2021 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daneshk/050997582bbe0ce630a635a22a510787 to your computer and use it in GitHub Desktop.
Save daneshk/050997582bbe0ce630a635a22a510787 to your computer and use it in GitHub Desktop.
RouteGuideClient ep = check new ("http://localhost:8980");
// Server streaming
Rectangle rectangle = {
lo: {latitude: 400000000, longitude: -750000000},
hi: {latitude: 420000000, longitude: -730000000}
};
stream<Feature, grpc:Error?> features = check ep->ListFeatures(rectangle);
error? e = features.forEach(function(Feature f) {
io:println(`Result: lat=${f.location.latitude}, lon=${f.location.longitude}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment