Client.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?php
  2. namespace Swoole\Http;
  3. class Client
  4. {
  5. public $type = 0;
  6. public $errCode = 0;
  7. public $errMsg = '';
  8. public $statusCode = 0;
  9. public $host = null;
  10. public $port = 0;
  11. public $ssl = false;
  12. public $requestMethod = null;
  13. public $requestHeaders = null;
  14. public $requestBody = null;
  15. public $uploadFiles = null;
  16. public $set_cookie_headers = null;
  17. public $downloadFile = null;
  18. public $headers = null;
  19. public $cookies = null;
  20. public $body = null;
  21. public $onConnect = null;
  22. public $onError = null;
  23. public $onMessage = null;
  24. public $onClose = null;
  25. public function __construct($host, $port = null, $ssl = null)
  26. {
  27. }
  28. public function __destruct()
  29. {
  30. }
  31. /**
  32. * @return mixed
  33. */
  34. public function set(array $settings)
  35. {
  36. }
  37. /**
  38. * @return mixed
  39. */
  40. public function setMethod($method)
  41. {
  42. }
  43. /**
  44. * @return mixed
  45. */
  46. public function setHeaders(array $headers)
  47. {
  48. }
  49. /**
  50. * @return mixed
  51. */
  52. public function setCookies(array $cookies)
  53. {
  54. }
  55. /**
  56. * @return mixed
  57. */
  58. public function setData($data)
  59. {
  60. }
  61. /**
  62. * @return mixed
  63. */
  64. public function addFile($path, $name, $type = null, $filename = null, $offset = null, $length = null)
  65. {
  66. }
  67. /**
  68. * @return mixed
  69. */
  70. public function execute($path, $callback)
  71. {
  72. }
  73. /**
  74. * @return mixed
  75. */
  76. public function push($data, $opcode = null, $flags = null)
  77. {
  78. }
  79. /**
  80. * @return mixed
  81. */
  82. public function get($path, $callback)
  83. {
  84. }
  85. /**
  86. * @return mixed
  87. */
  88. public function post($path, $data, $callback)
  89. {
  90. }
  91. /**
  92. * @return mixed
  93. */
  94. public function upgrade($path, $callback)
  95. {
  96. }
  97. /**
  98. * @return mixed
  99. */
  100. public function download($path, $file, $callback, $offset = null)
  101. {
  102. }
  103. /**
  104. * @return mixed
  105. */
  106. public function isConnected()
  107. {
  108. }
  109. /**
  110. * @return mixed
  111. */
  112. public function close()
  113. {
  114. }
  115. /**
  116. * @return mixed
  117. */
  118. public function on($event_name, $callback)
  119. {
  120. }
  121. }