cvs: pear /Net_GameServerQuery Config.php GameServerQuery.php Socket.php

From: Date: Thu, 01 Jul 2004 15:17:06 +0000
Subject: cvs: pear /Net_GameServerQuery Config.php GameServerQuery.php Socket.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-21362@lists.php.net to get a copy of this message
aidan Thu Jul 1 11:17:06 2004 EDT Modified files: /pear/Net_GameServerQuery Config.php GameServerQuery.php Socket.php Log: Changed a million things http://cvs.php.net/diff.php/pear/Net_GameServerQuery/Config.php?r1=1.3&r2=1.4&ty=u Index: pear/Net_GameServerQuery/Config.php diff -u pear/Net_GameServerQuery/Config.php:1.3 pear/Net_GameServerQuery/Config.php:1.4 --- pear/Net_GameServerQuery/Config.php:1.3 Thu Jul 1 10:26:24 2004 +++ pear/Net_GameServerQuery/Config.php Thu Jul 1 11:17:06 2004 @@ -7,7 +7,7 @@ * @category Net * @package Net_GameServerQuery_Config * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ class Net_GameServerQuery_Config { @@ -85,8 +85,8 @@ */ public function getdefaultqueryport($game) { + $protocol = $this->_game[$game]; return $this->_protocol[$protocol]['queryport']; - } } http://cvs.php.net/diff.php/pear/Net_GameServerQuery/GameServerQuery.php?r1=1.7&r2=1.8&ty=u Index: pear/Net_GameServerQuery/GameServerQuery.php diff -u pear/Net_GameServerQuery/GameServerQuery.php:1.7 pear/Net_GameServerQuery/GameServerQuery.php:1.8 --- pear/Net_GameServerQuery/GameServerQuery.php:1.7 Thu Jul 1 10:26:24 2004 +++ pear/Net_GameServerQuery/GameServerQuery.php Thu Jul 1 11:17:06 2004 @@ -16,7 +16,7 @@ // | Authors: Aidan Lister <aidan@php.net> | // +----------------------------------------------------------------------+ // -// $Id: GameServerQuery.php,v 1.7 2004/07/01 14:26:24 aidan Exp $ +// $Id: GameServerQuery.php,v 1.8 2004/07/01 15:17:06 aidan Exp $ require_once 'Config.php'; @@ -29,7 +29,7 @@ * @category Net * @package Net_GameServerQuery * @author Aidan Lister <aidan@php.net> - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ */ class Net_GameServerQuery { @@ -101,7 +101,7 @@ // Default port if (is_null($port)) { $protocol = $this->_config->getprotocol($game); - $port = $this->_config->getdefaultport($protocol); + $port = $this->_config->getdefaultqueryport($protocol); } // Add information to our servers array http://cvs.php.net/diff.php/pear/Net_GameServerQuery/Socket.php?r1=1.5&r2=1.6&ty=u Index: pear/Net_GameServerQuery/Socket.php diff -u pear/Net_GameServerQuery/Socket.php:1.5 pear/Net_GameServerQuery/Socket.php:1.6 --- pear/Net_GameServerQuery/Socket.php:1.5 Thu Jul 1 10:26:24 2004 +++ pear/Net_GameServerQuery/Socket.php Thu Jul 1 11:17:06 2004 @@ -1,18 +1,25 @@ <?php /** * The socket class + * + * This needs a more relevant name too + * + * @category Net + * @package Net_GameServerQuery_Config + * @author Aidan Lister <aidan@php.net> + * @version $Revision: 1.6 $ */ class Net_GameServerQuery_Socket { - /** - * The sockets / list of sockets - */ - private $_sockets; - private $_sockets_list; - /** - * Do the whole lot + * Perform a batch query + * + * This runs open, write, listen and close sequentially + * + * @param array $servers An array of server data + * @param int $timeout A timeout in milliseconds + * @return array An array of results */ public function batchquery($servers, $timeout) { @@ -25,7 +32,10 @@ /** - * Open + * Open the sockets + * + * @param array $servers An array of server data + * @return array An array of sockets and an array of corresponding keys */ public function open($servers) { @@ -56,7 +66,11 @@ /** - * Write + * Write a packet to a socket + * + * @param resource $socket The socket + * @param string $packet The packet + * @return bool True if the packet was written */ public function write($socket, $packet) { @@ -65,7 +79,12 @@ /** - * Listen + * Listen to an array of sockets + * + * @param array $sockets An array of sockets + * @param array $sockets_list An array of socket relationships + * @param int $timeout The maximum time to listen for + * @return array An array of result data */ public function listen($sockets, $sockets_list, $timeout) { @@ -94,7 +113,10 @@ /** - * Close + * Close each socket + * + * @param string $sockets An array of sockets + * @return void */ public function close($sockets) {

« previous php.pear.cvs (#21362) next »