note 101838 added to function.pfsockopen
| From: | donald at ddj dot co dot za | Date: | Thu, 13 Jan 2011 15:56:21 +0000 |
| Subject: | note 101838 added to function.pfsockopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175715@lists.php.net to get a copy of this message | ||
I am trying to figure out how the locking / synchronization works on pfsockopen, if there is even
any?
Example is:
$fp = pfsockopen("myhost.com", 80, $errno, $errstr);
fwrite($fp, "MyRequest1");
$data = fread($fp, 8192); /* Server should now spend specific answer */
What if your server is very heavily loaded, and another script calls pfsockopen() and its own
fwrite() on the same host/port between the fwrite and the fread of the currently executing script?
Would this then cause incorrect information in the data read (out of sync?) or does PHP have some
sort of protection against this.
Thanks,
Donald
----
Server IP: 69.147.83.197
Probable Submitter: 41.133.11.39
----
Manual Page -- http://www.php.net/manual/en/function.pfsockopen.php
Edit -- https://master.php.net/note/edit/101838
Del: integrated -- https://master.php.net/note/delete/101838/integrated
Del: useless -- https://master.php.net/note/delete/101838/useless
Del: bad code -- https://master.php.net/note/delete/101838/bad+code
Del: spam -- https://master.php.net/note/delete/101838/spam
Del: non-english -- https://master.php.net/note/delete/101838/non-english
Del: in docs -- https://master.php.net/note/delete/101838/in+docs
Del: other reasons-- https://master.php.net/note/delete/101838
Reject -- https://master.php.net/note/reject/101838
Search -- https://master.php.net/manage/user-notes.php