client.proto 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 RequestData {
  20. BPoint tile = 1;
  21. uint64 from = 2;
  22. }
  23. message WebRTCRequest {
  24. oneof WebRTCRequestOneOf {
  25. RequestData requestData = 1;
  26. }
  27. }
  28. message WebRTCReply {
  29. oneof WebRTCReplyOneOf {
  30. RequestData requestData = 1;
  31. }
  32. }
  33. message WebSocketRequest {
  34. oneof WebSocketRequestOneOf {
  35. RequestData requestData = 1;
  36. }
  37. }
  38. message WebSocketReply {
  39. oneof WebSocketReplyOneOf {
  40. RequestData requestData = 1;
  41. }
  42. }
  43. message MonitorPoint {
  44. BPoint point = 1;
  45. BColor color = 2;
  46. }
  47. message MonitorReply {
  48. repeated MonitorPoint points = 1;
  49. BPoint tile = 2;
  50. }
  51. message MonitorRequest {
  52. int64 last = 1;
  53. BPoint tile = 2;
  54. }
  55. message MonitorPointList {
  56. repeated MonitorPoint points = 1;
  57. }
  58. message BPoint {
  59. int32 x = 1;
  60. int32 y = 2;
  61. }
  62. message BColor { uint32 rgba = 1; }
  63. message PaintRequest {
  64. BPoint point = 1;
  65. BColor color = 2;
  66. }
  67. // The response message containing the greetings
  68. message PaintReply { string message = 1; }
  69. message RTCData {
  70. string event = 1;
  71. string data = 2;
  72. }