Permalink
Browse files

* Fix bug #23161

* Improve PHPDoc


git-svn-id: http://svn.php.net/repository/pear/packages/Net_Portscan/trunk@124262 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent b9b1565 commit 3d78302f75da8c40670986d733250779ac07952a @mj mj committed Apr 22, 2003
Showing with 7 additions and 6 deletions.
  1. +7 −6 Portscan.php
View
@@ -58,6 +58,7 @@ function checkPort($host, $port, $timeout = 30)
return NET_PORTSCAN_NO_SERVICE;
}
+ @fclose($socket);
return NET_PORTSCAN_SERVICE_FOUND;
}
@@ -79,7 +80,7 @@ function checkPort($host, $port, $timeout = 30)
*/
function checkPortRange($host, $minPort, $maxPort, $timeout = 30)
{
- for ($i = $minPort; $i <= $maxPort; $i++) {
+ for ($i = $minPort; $i <= $maxPort; $i++) {
$retVal[$i] = Net_Portscan::checkPort($host, $i, $timeout);
}
@@ -94,8 +95,8 @@ function checkPortRange($host, $minPort, $maxPort, $timeout = 30)
*
* @access public
* @param integer Portnumber
- * @param string Protocal (default is tcp)
- * @return string Name of the service
+ * @param string Protocol (Is either tcp or udp. Default is tcp.)
+ * @return string Name of the Internet service associated with $service
*/
function getService($port, $protocol = "tcp")
{
@@ -109,9 +110,9 @@ function getService($port, $protocol = "tcp")
* Get port that a certain service uses.
*
* @access public
- * @param string Name of the service
- * @param string Protocal (default is tcp)
- * @return integer Portnumber
+ * @param string Name of the service
+ * @param string Protocol (Is either tcp or udp. Default is tcp.)
+ * @return integer Internet port which corresponds to $service
*/
function getPort($service, $protocol = "tcp")
{

0 comments on commit 3d78302

Please sign in to comment.