Using a GRPC client creates a stream. An important note that the client should be already connected (client.connect called) to the server before creating a stream.
|Stream(client, url, [,params])||Using a GRPC client creates a stream.|
|Stream.write(message)||Writes a message to the stream.|
|Stream.on(event, handler)||Set up handler functions for various events on the GRPC stream.|
|Stream.end()||Signals to the server that the client has finished sending.|
A k6 script that sends several randomly chosen points from the pre-generated feature database with a variable delay in between. Prints the statistics when they are sent from the server.
A k6 script that sends a rectangle message and results (features) are streamed back to the client.
The preceding examples use a demo server, which you can run with the following command (Golang should be installed) in k6 repository's root: