Skip to content

Commit

Permalink
- added Net_DNS2::getSockets(), which returns the local sockets cache…
Browse files Browse the repository at this point in the history
… array.
  • Loading branch information
mikepultz committed Oct 5, 2020
1 parent 8dc4b71 commit a80d120
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Net/DNS2.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,17 @@ public function setServers($nameservers)
return true;
}

/**
* return the internal $sock array
*
* @return array
* @access public
*/
public function getSockets()
{
return $this->sock;
}

/**
* give users access to close all open sockets on the resolver object; resetting each
* array, calls the destructor on the Net_DNS2_Socket object, which calls the close()
Expand Down
1 change: 1 addition & 0 deletions package.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"- added the AMTRELAY resource record type (RFC 8777).\n" .
"- added Net_DNS2_RR::asArray(), which returns the same values as __toString(), but as an array for easier access.\n" .
"- added Net_DNS2::closeSockets(), which lets you close all cached network sockets in the resolver object.\n" .
"- added Net_DNS2::getSockets(), which returns the local sockets cache array.\n" .
"- added date_created and date_last_used to the Net_DNS2_Socket object, to track usage stats on each socket object.\n" .
"- dropped the Net_DNS2_Socket_Sockets, and switch to just using the streams code. There's no speed difference anymore.\n" .
"- fixed a bug in Net_DNS2_Packet::compress() and Net_DNS2_Packet::expand() related to dot literals in compressed names.\n" .
Expand Down

0 comments on commit a80d120

Please sign in to comment.