Server.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <?php
  2. namespace Swoole;
  3. class Server
  4. {
  5. private $onStart;
  6. private $onShutdown;
  7. private $onWorkerStart;
  8. private $onWorkerStop;
  9. private $onBeforeReload;
  10. private $onAfterReload;
  11. private $onWorkerExit;
  12. private $onWorkerError;
  13. private $onTask;
  14. private $onFinish;
  15. private $onManagerStart;
  16. private $onManagerStop;
  17. private $onPipeMessage;
  18. public $setting;
  19. public $connections;
  20. public $host = '';
  21. public $port = 0;
  22. public $type = 0;
  23. public $mode = 0;
  24. public $ports;
  25. public $master_pid = 0;
  26. public $manager_pid = 0;
  27. public $worker_id = -1;
  28. public $taskworker = false;
  29. public $worker_pid = 0;
  30. public $stats_timer;
  31. public function __construct($host, $port = null, $mode = null, $sock_type = null)
  32. {
  33. }
  34. public function __destruct()
  35. {
  36. }
  37. /**
  38. * @return mixed
  39. */
  40. public function listen($host, $port, $sock_type)
  41. {
  42. }
  43. /**
  44. * @return mixed
  45. */
  46. public function addlistener($host, $port, $sock_type)
  47. {
  48. }
  49. /**
  50. * @return mixed
  51. */
  52. public function on($event_name, callable $callback)
  53. {
  54. }
  55. /**
  56. * @return mixed
  57. */
  58. public function getCallback($event_name)
  59. {
  60. }
  61. /**
  62. * @return mixed
  63. */
  64. public function set(array $settings)
  65. {
  66. }
  67. /**
  68. * @return mixed
  69. */
  70. public function start()
  71. {
  72. }
  73. /**
  74. * @return mixed
  75. */
  76. public function send($fd, $send_data, $server_socket = null)
  77. {
  78. }
  79. /**
  80. * @return mixed
  81. */
  82. public function sendto($ip, $port, $send_data, $server_socket = null)
  83. {
  84. }
  85. /**
  86. * @return mixed
  87. */
  88. public function sendwait($conn_fd, $send_data)
  89. {
  90. }
  91. /**
  92. * @return mixed
  93. */
  94. public function exists($fd)
  95. {
  96. }
  97. /**
  98. * @return mixed
  99. */
  100. public function exist($fd)
  101. {
  102. }
  103. /**
  104. * @return mixed
  105. */
  106. public function protect($fd, $is_protected = null)
  107. {
  108. }
  109. /**
  110. * @return mixed
  111. */
  112. public function sendfile($conn_fd, $filename, $offset = null, $length = null)
  113. {
  114. }
  115. /**
  116. * @return mixed
  117. */
  118. public function close($fd, $reset = null)
  119. {
  120. }
  121. /**
  122. * @return mixed
  123. */
  124. public function confirm($fd)
  125. {
  126. }
  127. /**
  128. * @return mixed
  129. */
  130. public function pause($fd)
  131. {
  132. }
  133. /**
  134. * @return mixed
  135. */
  136. public function resume($fd)
  137. {
  138. }
  139. /**
  140. * @return mixed
  141. */
  142. public function task($data, $worker_id = null, ?callable $finish_callback = null)
  143. {
  144. }
  145. /**
  146. * @return mixed
  147. */
  148. public function taskwait($data, $timeout = null, $worker_id = null)
  149. {
  150. }
  151. /**
  152. * @return mixed
  153. */
  154. public function taskWaitMulti(array $tasks, $timeout = null)
  155. {
  156. }
  157. /**
  158. * @return mixed
  159. */
  160. public function taskCo(array $tasks, $timeout = null)
  161. {
  162. }
  163. /**
  164. * @return mixed
  165. */
  166. public function finish($data)
  167. {
  168. }
  169. /**
  170. * @return mixed
  171. */
  172. public function reload()
  173. {
  174. }
  175. /**
  176. * @return mixed
  177. */
  178. public function shutdown()
  179. {
  180. }
  181. /**
  182. * @return mixed
  183. */
  184. public function stop($worker_id = null)
  185. {
  186. }
  187. /**
  188. * @return mixed
  189. */
  190. public function getLastError()
  191. {
  192. }
  193. /**
  194. * @return mixed
  195. */
  196. public function heartbeat($reactor_id)
  197. {
  198. }
  199. /**
  200. * @return mixed
  201. */
  202. public function getClientInfo($fd, $reactor_id = null)
  203. {
  204. }
  205. /**
  206. * @return mixed
  207. */
  208. public function getClientList($start_fd, $find_count = null)
  209. {
  210. }
  211. /**
  212. * @return mixed
  213. */
  214. public function getWorkerId()
  215. {
  216. }
  217. /**
  218. * @return mixed
  219. */
  220. public function getWorkerPid()
  221. {
  222. }
  223. /**
  224. * @return mixed
  225. */
  226. public function getWorkerStatus($worker_id = null)
  227. {
  228. }
  229. /**
  230. * @return mixed
  231. */
  232. public function getManagerPid()
  233. {
  234. }
  235. /**
  236. * @return mixed
  237. */
  238. public function getMasterPid()
  239. {
  240. }
  241. /**
  242. * @return mixed
  243. */
  244. public function connection_info($fd, $reactor_id = null)
  245. {
  246. }
  247. /**
  248. * @return mixed
  249. */
  250. public function connection_list($start_fd, $find_count = null)
  251. {
  252. }
  253. /**
  254. * @return mixed
  255. */
  256. public function sendMessage($message, $dst_worker_id)
  257. {
  258. }
  259. /**
  260. * @return mixed
  261. */
  262. public function addProcess(\swoole_process $process)
  263. {
  264. }
  265. /**
  266. * @return mixed
  267. */
  268. public function stats()
  269. {
  270. }
  271. /**
  272. * @return mixed
  273. */
  274. public function getSocket($port = null)
  275. {
  276. }
  277. /**
  278. * @return mixed
  279. */
  280. public function bind($fd, $uid)
  281. {
  282. }
  283. }