PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

stream_socket_pair> <stream_socket_enable_crypto
Last updated: Fri, 05 Sep 2008

view this page in

stream_socket_get_name

(PHP 5)

stream_socket_get_nameLit le nom des sockets locale ou distante

Description

string stream_socket_get_name ( resource $handle , bool $want_peer )

stream_socket_get_name() retourne le nom de la socket locale ou distante pour la connexion handle . Si want_peer vaut TRUE, le nom de la socket distante est retourné. S'il vaut FALSE, c'est celui de la socket locale.

Voir aussi stream_socket_accept().



add a note add a note User Contributed Notes
stream_socket_get_name
eddi at to-grip dot de
15-May-2006 09:07
Use this function to check current status of a connection:
<?php
$c
=stream_socket_server("tcp://127.0.0.1:1100");
while(
1){
   if(
is_resource($a=stream_socket_accept($c))){
     
# do something time-consuming
     
if(stream_socket_get_name($a,true)!==false){
        
fwrite($a,"Regards form Berlin");
      }
   }
}
?>

stream_socket_pair> <stream_socket_enable_crypto
Last updated: Fri, 05 Sep 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites