PHP client question: why socket_create()?

Ryan T. Dean Ryan T. Dean" <
Sun, 5 Oct 2003 18:53:29 -0400

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I was taking a look at the PHP client, and I had a question... why is=20
the client using socket_create and not (p)fsockopen?  I've only read=20
through the code quickly, but using socket_create the socket(s) have to=20
be recreated every execution, and reading informaiton back in is a=20
little... sloppy.

fsockopen opens a socket and returns a stream pointer that can be used=20
with all the standard file io commands - fgets, fwrite, etc.  It seems=20
that this would simplify things a little bit.

Also, this brings in the possibility for a persistant connection using=20
pfsockopen.  Granted, its only persistant to the individual httpd=20
process that its called, but for a high traffic site (where you would=20
use persistant connections) you don't have to reopen all the sockets=20
every time....

		-Ryan T. Dean

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (FreeBSD)