Parser.php 786 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace PHPSocketIO\Parser;
  3. class Parser
  4. {
  5. /**
  6. * Packet type `connect`.
  7. *
  8. * @api public
  9. */
  10. const CONNECT = 0;
  11. /**
  12. * Packet type `disconnect`.
  13. *
  14. * @api public
  15. */
  16. const DISCONNECT = 1;
  17. /**
  18. * Packet type `event`.
  19. *
  20. * @api public
  21. */
  22. const EVENT = 2;
  23. /**
  24. * Packet type `ack`.
  25. *
  26. * @api public
  27. */
  28. const ACK = 3;
  29. /**
  30. * Packet type `error`.
  31. *
  32. * @api public
  33. */
  34. const ERROR = 4;
  35. /**
  36. * Packet type 'binary event'
  37. *
  38. * @api public
  39. */
  40. const BINARY_EVENT = 5;
  41. /**
  42. * Packet type `binary ack`. For acks with binary arguments.
  43. *
  44. * @api public
  45. */
  46. const BINARY_ACK = 6;
  47. public static $types = array(
  48. 'CONNECT',
  49. 'DISCONNECT',
  50. 'EVENT',
  51. 'BINARY_EVENT',
  52. 'ACK',
  53. 'BINARY_ACK',
  54. 'ERROR'
  55. );
  56. }