File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 2020 */
2121class Process
2222{
23+ /**
24+ * @var Server
25+ */
26+ protected $ server ;
27+
2328 /**
2429 * @var swoole_process
2530 */
@@ -114,6 +119,17 @@ public function write($data)
114119 return $ this ->process ->write ($ data );
115120 }
116121
122+ /**
123+ * @param Server $server
124+ * @return $this
125+ */
126+ public function setServer (Server $ server )
127+ {
128+ $ this ->server = $ server ;
129+
130+ return $ this ;
131+ }
132+
117133 /**
118134 * @param $signo
119135 * @param callable $callback
Original file line number Diff line number Diff line change @@ -281,6 +281,8 @@ public function process(Process $process)
281281 {
282282 $ this ->processes [] = $ process ;
283283
284+ $ process ->setServer ($ this );
285+
284286 return $ this ;
285287 }
286288
You can’t perform that action at this time.
0 commit comments