client.proto 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. syntax = "proto3";
  2. // protoc --dart_out=grpc:lib/src/generated -I server/protos/ -Iproto
  3. // client.proto
  4. //export PATH="$PATH":"$HOME/development/flutter/.pub-cache/bin"
  5. option go_package = "./protos/client";
  6. // protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=.
  7. // --go-grpc_opt=paths=source_relative protos/client.proto
  8. // The greeting service definition.
  9. service PaintClient {
  10. // Sends a greeting
  11. rpc Paint(PaintRequest) returns (PaintReply) {}
  12. rpc Monitor(MonitorSub) returns (stream MonitorReply) {}
  13. rpc RequestRTC(stream RTCData) returns (stream RTCData) {}
  14. }
  15. message MonitorSub {
  16. BPoint tile = 1;
  17. bool susbscribed = 2;
  18. }
  19. message MonitorPoint {
  20. BPoint point = 1;
  21. BColor color = 2;
  22. }
  23. message MonitorReply {
  24. repeated MonitorPoint points = 1;
  25. bytes bytes_points = 2;
  26. }
  27. message MonitorPointList {
  28. repeated MonitorPoint points = 1;
  29. }
  30. message BPoint {
  31. int32 x = 1;
  32. int32 y = 2;
  33. }
  34. message BColor { uint32 rgba = 1; }
  35. message PaintRequest {
  36. BPoint point = 1;
  37. BColor color = 2;
  38. }
  39. // The response message containing the greetings
  40. message PaintReply { string message = 1; }
  41. message RTCData {
  42. string event = 1;
  43. string data = 2;
  44. }