#35745 [NEW]: Status of persistent socket connections in stream_get_meta_data

From: Date: Tue, 20 Dec 2005 13:48:06 +0000
Subject: #35745 [NEW]: Status of persistent socket connections in stream_get_meta_data
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90715@lists.php.net to get a copy of this message
From:             gavin dot brown at uk dot com
Operating system: All
PHP version:      5.1.1
PHP Bug Type:     Feature/Change Request
Bug description:  Status of persistent socket connections in stream_get_meta_data

Description:
------------
Currently, there is now way to determine if the pfsockopen() created a new
connection or used an existing connection.


Expected result:
----------------
This information is very important for some protocols (specifically, the
EPP protocol, RFC 3730, and its TCP transport specification in RFC 3734),
which uses a stateful session management system.

I'd suggest something like this:

<?php

$sock = pfsockopen($host, $port, $etc);

$data = stream_get_meta_data($sock);

print $data[persistent];

?>

the value of $data[persistent] might be one of "new" or "existing",
depending on whether the previous pfsockopen() had to create a new
connection, or was able to reuse an existing one.

This would be very useful for protocols like EPP (see RFC 3734) and IMAP,
which are stateful, and for which negotiation and authentication are done
once, upon connection.


-- 
Edit bug report at http://bugs.php.net/?id=35745&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35745&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35745&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35745&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35745&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=35745&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35745&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35745&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35745&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35745&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35745&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=35745&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=35745&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35745&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35745&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35745&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35745&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35745&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35745&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35745&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35745&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#90715) next »