How to tell if a socket is connected
| From: | Michael W. | Date: | Sat, 10 Jun 2006 03:56:41 +0000 |
| Subject: | How to tell if a socket is connected | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-237727@lists.php.net to get a copy of this message | ||
Hello,
Can any of you tell me how to tell whether a socket (from fsockopen()) is
connected or not? Specifically, whether the remote server has closed the
connection? Stream_get_meta_data() does not do it; in my tests, its output
does not change even when the server closes the stream.
Thank you,
Michael W.