Re: Socket_Socket as "extended copy" of Net_Socket
| From: | Jon Parise | Date: | Fri, 07 Feb 2003 03:29:21 +0000 |
| Subject: | Re: Socket_Socket as "extended copy" of Net_Socket | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13044@lists.php.net to get a copy of this message | ||
On Thu, Feb 06, 2003 at 07:41:38PM +0100, Stephan Seidt wrote:
> I just suggested the "Socket" category some time ago
> and also its first package Socket_Socket.
>
> To use it seriously I thought about some compatiblity
> options with the Net_Socket package. What about sth like:
>
> if (!extension_loaded('sockets')) {
> return &new Net_Socket;
> }
>
> I copy Net_Socket to Socket_Socket and change the code
> in it to work with the new sockets. I also add the new
> functions bind, listen, accept, select, etc.
Why don't you just make Net_Socket "smarter"? Introducing two socket
packages seems redundants to me (although I don't really know what
additional functionality is to be provided by your Socket_Socket
class).
--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)