WebSocketProtocol.proto 836 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright 2020 Signal Messenger, LLC
  3. * SPDX-License-Identifier: AGPL-3.0-only
  4. */
  5. syntax = "proto2";
  6. package signalservice;
  7. option java_package = "org.whispersystems.websocket.messages.protobuf";
  8. option java_outer_classname = "SubProtocol";
  9. message WebSocketRequestMessage {
  10. optional string verb = 1;
  11. optional string path = 2;
  12. optional bytes body = 3;
  13. repeated string headers = 5;
  14. optional uint64 id = 4;
  15. }
  16. message WebSocketResponseMessage {
  17. optional uint64 id = 1;
  18. optional uint32 status = 2;
  19. optional string message = 3;
  20. repeated string headers = 5;
  21. optional bytes body = 4;
  22. }
  23. message WebSocketMessage {
  24. enum Type {
  25. UNKNOWN = 0;
  26. REQUEST = 1;
  27. RESPONSE = 2;
  28. }
  29. optional Type type = 1;
  30. optional WebSocketRequestMessage request = 2;
  31. optional WebSocketResponseMessage response = 3;
  32. }