client.reconnect.json 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. [
  2. {
  3. "function": "get_resource_type",
  4. "params": [
  5. "@mock-stream"
  6. ],
  7. "return": "Unknown"
  8. },
  9. {
  10. "function": "get_resource_type",
  11. "params": [
  12. "@mock-stream"
  13. ],
  14. "return": "stream"
  15. },
  16. {
  17. "function": "stream_context_create",
  18. "params": [],
  19. "return": "@mock-stream-context"
  20. },
  21. {
  22. "function": "stream_socket_client",
  23. "params": [
  24. "tcp:\/\/localhost:8000",
  25. null,
  26. null,
  27. 5,
  28. 4,
  29. "@mock-stream-context"
  30. ],
  31. "return": "@mock-stream"
  32. },
  33. {
  34. "function": "get_resource_type",
  35. "params": [
  36. "@mock-stream"
  37. ],
  38. "return": "stream"
  39. },
  40. {
  41. "function": "stream_set_timeout",
  42. "params": [
  43. "@mock-stream",
  44. 5
  45. ],
  46. "return": true
  47. },
  48. {
  49. "function": "fwrite",
  50. "params": [
  51. "@mock-stream"
  52. ],
  53. "return-op": "key-save",
  54. "return": 199
  55. },
  56. {
  57. "function": "stream_get_line",
  58. "params": [
  59. "@mock-stream",
  60. 1024,
  61. "\r\n\r\n"
  62. ],
  63. "return-op": "key-respond",
  64. "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: {key}"
  65. },
  66. {
  67. "function": "fread",
  68. "params": [
  69. "@mock-stream",
  70. 2
  71. ],
  72. "return-op": "chr-array",
  73. "return": [129, 147]
  74. },
  75. {
  76. "function": "fread",
  77. "params": [
  78. "@mock-stream",
  79. 4
  80. ],
  81. "return-op": "chr-array",
  82. "return": [33, 111, 149, 174]
  83. },
  84. {
  85. "function": "fread",
  86. "params": [
  87. "@mock-stream",
  88. 19
  89. ],
  90. "return-op": "chr-array",
  91. "return": [115, 10, 246, 203, 72, 25, 252, 192, 70, 79, 244, 142, 76, 10, 230, 221, 64, 8, 240]
  92. },
  93. {
  94. "function": "get_resource_type",
  95. "params": [
  96. "@mock-stream"
  97. ],
  98. "return": "stream"
  99. }
  100. ]