<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>评论：php 实例说明 socket通信机制</title>
	<atom:link href="http://blog.51yip.com/php/673.html/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.51yip.com/php/673.html</link>
	<description>－－一步，二步，三步，N步，二行脚印</description>
	<lastBuildDate>Tue, 07 Jun 2022 01:26:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>来自：nobody</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-17628</link>
		<dc:creator>nobody</dc:creator>
		<pubDate>Wed, 12 Jul 2017 00:16:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-17628</guid>
		<description>多谢，很简洁，思路清晰多了</description>
		<content:encoded><![CDATA[<p>多谢，很简洁，思路清晰多了</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：PenguinChen</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-17493</link>
		<dc:creator>PenguinChen</dc:creator>
		<pubDate>Tue, 30 Aug 2016 03:31:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-17493</guid>
		<description>我這邊一直卡在讀 或者 寫
後來終於解決了！

1. 我這邊 在 Server端綁定的時候改成了這樣
    socket_listen($sock, 3);
2. 我在寫入的時候有加上長度
        $buff = &#039;connection&#039;.&quot;\n&quot;;
        socket_write($connection, $buff, strlen($buff));

希望可以幫助到有卡關的人</description>
		<content:encoded><![CDATA[<p>我這邊一直卡在讀 或者 寫<br />
後來終於解決了！</p>
<p>1. 我這邊 在 Server端綁定的時候改成了這樣<br />
    socket_listen($sock, 3);<br />
2. 我在寫入的時候有加上長度<br />
        $buff = 'connection'."\n";<br />
        socket_write($connection, $buff, strlen($buff));</p>
<p>希望可以幫助到有卡關的人</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：张映</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-3482</link>
		<dc:creator>张映</dc:creator>
		<pubDate>Sat, 20 Apr 2013 16:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-3482</guid>
		<description>socket服务端，一直监听端口，客户端有请求进，会建立连接，通信结束，连接断开。socket不是http协议，你要搞清楚，socket和http的区别。</description>
		<content:encoded><![CDATA[<p>socket服务端，一直监听端口，客户端有请求进，会建立连接，通信结束，连接断开。socket不是http协议，你要搞清楚，socket和http的区别。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：小中</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-3436</link>
		<dc:creator>小中</dc:creator>
		<pubDate>Thu, 18 Apr 2013 09:55:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-3436</guid>
		<description>你好...我似乎以經成功執行了..但我發現我socket...只能執行一次的樣子？...

我的client ...我也只是整段去跑而以

腦袋似乎不太靈光...是說..我把server 一直用瀏覽器開器的狀態開著就好。

還是說用執行去跑socket這支程式好？</description>
		<content:encoded><![CDATA[<p>你好...我似乎以經成功執行了..但我發現我socket...只能執行一次的樣子？...</p>
<p>我的client ...我也只是整段去跑而以</p>
<p>腦袋似乎不太靈光...是說..我把server 一直用瀏覽器開器的狀態開著就好。</p>
<p>還是說用執行去跑socket這支程式好？</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：小中</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-3431</link>
		<dc:creator>小中</dc:creator>
		<pubDate>Thu, 18 Apr 2013 01:06:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-3431</guid>
		<description>我的port口 有開放出來 我自己設是9988 我防火牆那裡就開啟 9988的port口 

我現在是不懂說..我借用了你的程式碼..放在網路上測試..我卻不知道要如何使用..

以為是用ie遊纜器去執行socket這支程式..但會發現程式不會運轉...我現在不懂的地方就是這裡</description>
		<content:encoded><![CDATA[<p>我的port口 有開放出來 我自己設是9988 我防火牆那裡就開啟 9988的port口 </p>
<p>我現在是不懂說..我借用了你的程式碼..放在網路上測試..我卻不知道要如何使用..</p>
<p>以為是用ie遊纜器去執行socket這支程式..但會發現程式不會運轉...我現在不懂的地方就是這裡</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：张映</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-3430</link>
		<dc:creator>张映</dc:creator>
		<pubDate>Wed, 17 Apr 2013 13:49:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-3430</guid>
		<description>socket是监听端口的，监听的端口要开放出来。</description>
		<content:encoded><![CDATA[<p>socket是监听端口的，监听的端口要开放出来。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：小中</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-3425</link>
		<dc:creator>小中</dc:creator>
		<pubDate>Wed, 17 Apr 2013 08:35:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-3425</guid>
		<description>我想請問一下...我使用php寫server端的東西...

但我卻不知道執行後出來的成果究竟為何..

我不知該怎麼測試才是正確的..

如果我今天直接用網站直接登入無法使用...(使用socket前還需要開啟什麼嗎？)

例：port的防火牆需要開啟之類的</description>
		<content:encoded><![CDATA[<p>我想請問一下...我使用php寫server端的東西...</p>
<p>但我卻不知道執行後出來的成果究竟為何..</p>
<p>我不知該怎麼測試才是正確的..</p>
<p>如果我今天直接用網站直接登入無法使用...(使用socket前還需要開啟什麼嗎？)</p>
<p>例：port的防火牆需要開啟之類的</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：yreenchan</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-2972</link>
		<dc:creator>yreenchan</dc:creator>
		<pubDate>Thu, 14 Mar 2013 07:49:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-2972</guid>
		<description>我的localhost是80端口，本地监听也用80吗？</description>
		<content:encoded><![CDATA[<p>我的localhost是80端口，本地监听也用80吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：张映</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-2287</link>
		<dc:creator>张映</dc:creator>
		<pubDate>Thu, 10 Jan 2013 02:22:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-2287</guid>
		<description>不明白你说的没有断开是什么意思。服务端，是一直都是处于监听状态的，当客户端连接后，数据传送结束，只是断开此次与这个客户端的连接。</description>
		<content:encoded><![CDATA[<p>不明白你说的没有断开是什么意思。服务端，是一直都是处于监听状态的，当客户端连接后，数据传送结束，只是断开此次与这个客户端的连接。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：weiminqiang</title>
		<link>http://blog.51yip.com/php/673.html/comment-page-1#comment-2233</link>
		<dc:creator>weiminqiang</dc:creator>
		<pubDate>Wed, 09 Jan 2013 10:11:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.51yip.com/?p=673#comment-2233</guid>
		<description>想问下，为什么我在我虚拟机上跑之，在客户端接收完服务端的数据tcp连接为啥木有断开？</description>
		<content:encoded><![CDATA[<p>想问下，为什么我在我虚拟机上跑之，在客户端接收完服务端的数据tcp连接为啥木有断开？</p>
]]></content:encoded>
	</item>
</channel>
</rss>
