[2nd try] PHP client question: why socket_create()?
Ryan T. Dean
Ryan T. Dean" <rtdean-dated-1065826691.ff0000@cytherianage.net
Sun, 5 Oct 2003 18:58:09 -0400
--JYK4vJDZwFMowpUq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Ack, lets try this again. Didn't have my outgoing settings quite right,=20
so my envelope address didn't get mapped properly...
----- Forwarded message from "Ryan T. Dean" <rtdean@cytherianage.net> -----
From: "Ryan T. Dean" <rtdean@cytherianage.net>
To: memcached@lists.danga.com
Date: Sun, 5 Oct 2003 18:53:29 -0400
Subject: PHP client question: why socket_create()?
Mail-Followup-To: "Ryan T. Dean" <rtdean@cytherianage.net>,
memcached@lists.danga.com
User-Agent: Mutt/1.4.1i
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
----- End forwarded message -----
--JYK4vJDZwFMowpUq
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQE/gKIBW6VZzwycJGURAmPtAJ9A4CJI7F3ZSBxz80+PBKX4iMFfpQCg3bfL
hFdmSLpgRKPLiaaqMuXYJQ8=
=QCJD
-----END PGP SIGNATURE-----
--JYK4vJDZwFMowpUq--