Untitled

We provide a demo file transfer scene, which allows you to transfer file locally from client to server.

Based on the Grpc Limitation, it only allows transfer 4Mb with each message call, but luckily, we can stream the large file through Grpc bi-direction stream protoc.

The File Transfer Command Proto:

syntax = "proto3";

package fileproto;

service FileTransfer{
   rpc SendFile(stream FileSendInfo) returns (stream FileReceivedReply){}
}

message FileSendInfo{
   bytes FileData = 1;
}

message FileReceivedReply{
    float Progress = 1;
}

Note : We use bi-direction stream for client and stream to send file bytes[] and trace progress from server.

How To Use:

Built-In Grpc Protobuf Generator