<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>https://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>https://jackxiang.com/post//</link>
<title><![CDATA[[实践OK]swoole进程间通讯之将管道导出为一个SwooleCoroutineSocket对象，通过读写此Socket就可以实现通信。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Swoole专题研究]]></category>
<pubDate>Wed, 13 Nov 2019 08:10:14 +0000</pubDate> 
<guid>https://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	（以下实例用到了assert，请确保php7的zend.assertions=1，或者 php -d &quot;zend.assertions=1&quot; 临时启用进行测试）<br/><br/>cat&nbsp;&nbsp;process.croutine.php <br/><textarea name="code" class="php" rows="15" cols="100">
&lt;?php
$proc1 = new &#92;swoole_process(function (swoole_process $proc) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;$socket = $proc-&gt;exportSocket();
&nbsp;&nbsp;&nbsp;&nbsp;echo $socket-&gt;recv();
&nbsp;&nbsp;&nbsp;&nbsp;$socket-&gt;send(&quot;hello proc2&#92;n&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;proc1 stop&#92;n&quot;;
&#125;, false, 1, true);

assert($proc1-&gt;start());

$proc2 = new &#92;swoole_process(function (swoole_process $proc) use ($proc1) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;Co::sleep(0.01);
&nbsp;&nbsp;&nbsp;&nbsp;$socket = $proc1-&gt;exportSocket();
&nbsp;&nbsp;&nbsp;&nbsp;$socket-&gt;send(&quot;hello proc1&#92;n&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;echo $socket-&gt;recv();
&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;proc2 stop&#92;n&quot;;
&#125;, false, 0, true);

assert($proc2-&gt;start());

swoole_process::wait(true);
swoole_process::wait(true);
</textarea><br/><br/>php -d &quot;zend.assertions=1&quot;&nbsp;&nbsp;process.croutine.php <br/>hello proc1<br/>proc1 stop<br/>hello proc2<br/>proc2 stop<br/><br/>来自：https://wiki.swoole.com/wiki/page/1061.html
]]>
</description>
</item><item>
<link>https://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [实践OK]swoole进程间通讯之将管道导出为一个SwooleCoroutineSocket对象，通过读写此Socket就可以实现通信。]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>