@@ -12,6 +12,10 @@ discard block |
||
12 | 12 | throw new \RuntimeException($error['message']); |
13 | 13 | } |
14 | 14 | } |
15 | +/** |
|
16 | + * @param integer $status |
|
17 | + * @param string $message |
|
18 | + */ |
|
15 | 19 | function respond_rest($con, $status, $message, $content) { |
16 | 20 | try { |
17 | 21 | $length = strlen($content); |
@@ -24,6 +28,11 @@ discard block |
||
24 | 28 | } |
25 | 29 | fclose($con); |
26 | 30 | } |
31 | +/** |
|
32 | + * @param Closure $tick_function |
|
33 | + * @param integer $tick |
|
34 | + * @param integer $times |
|
35 | + */ |
|
27 | 36 | function respond_streaming($con, $tick_function, $tick, $times) { |
28 | 37 | try { |
29 | 38 | fsend($con, "HTTP/1.1 200 OK\r\n"); |