PHP client question: why socket_create()?

Ryan T. Dean Ryan T. Dean" <rtdean-dated-1065826411.b0c000@cytherianage.net
Sun, 5 Oct 2003 18:53:29 -0400


--T4sUOijqQbZv57TR
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

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/gKDpW6VZzwycJGURAharAKDNUfK9xHHX13kntrPc+JzEqUs+8ACfeRJ0
okWgO3wNTdJfT2lEJYis0jM=
=KFqZ
-----END PGP SIGNATURE-----

--T4sUOijqQbZv57TR--