[TASK] Did some small changes in the code. Also updated some comments.
This commit is contained in:
@@ -39,22 +39,22 @@ class Socket_SocketPool {
|
||||
|
||||
/**
|
||||
* Adds a socket to the pool
|
||||
* @param ressource $add_socket
|
||||
* @param ressource $addSocket
|
||||
* @return void
|
||||
*/
|
||||
public function addSocket($add_socket) {
|
||||
array_push($this->sockets, $add_socket);
|
||||
public function addSocket($addSocket) {
|
||||
array_push($this->sockets, $addSocket);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the given socket from the pool.
|
||||
* The socket will be shutdown.
|
||||
* @param ressource $remove_socket
|
||||
* @param ressource $removeSocket
|
||||
* @return void
|
||||
*/
|
||||
public function removeSocket($remove_socket) {
|
||||
public function removeSocket($removeSocket) {
|
||||
foreach($this->sockets AS $key=>$socket) {
|
||||
if($socket !== $remove_socket) {
|
||||
if($socket !== $removeSocket) {
|
||||
continue;
|
||||
} else {
|
||||
unset($socket);
|
||||
|
||||
Reference in New Issue
Block a user