Re: Rendezvous in php

From: Date: Tue, 06 Jul 2004 21:45:38 +0000
Subject: Re: Rendezvous in php
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-10936@lists.php.net to get a copy of this message
Hi first. pecl-dev@lists.php.net is the right place for this second. there's already a zeroconf extension at pecl (based on howl), which does some rendezvous stuff. Maybe you could join efforts with them. http://pecl.php.net/package-info.php?package=zeroconf But yes, rendezvous support in PHP could certainly have its uses. chregu On 6.7.2004 23:41 Uhr, John LeSueur wrote:
I apologize if this is the wrong place for this. I have been working on building a rendezvous php module, and have a proof of concept. I've been developing it on windows, but I think it should compile fine for the real platforms. Feel free to point and laugh, it isn't amazing code. sample usage: <? $conn = rendezvous_register_service(
                   "_http._tcp" //dnstype
                   , 4500 //port
                   0// optional - interface.  0 means all, -1 means local only.
       );//returns a rendezvous connection resource
$servers = rendezvous_browse(
                   "_http._tcp" //dnstype
                  , 2 //optional - timeout in seconds
                  , 100 //optional - timeout in microseconds
                  , 0 //optional - interface, see above...
       );//returns an array of hosts that responded.
     echo("<pre>");
print_r($conn); print_r($servers); echo("</pre>");
     rendezvous_unregister_service($conn);//stop advertising
?> John LeSueur
-- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB

« previous php.internals (#10936) next »