lithium\net\socket\Context::close PHP Method

close() public method

Closes the socket connection.
public close ( ) : boolean
return boolean Success.
    public function close()
    {
        if (!is_resource($this->_resource)) {
            return true;
        }
        fclose($this->_resource);
        if (is_resource($this->_resource)) {
            $this->close();
        }
        return true;
    }

Usage Example

Ejemplo n.º 1
0
 public function testConstruct()
 {
     $subject = new Context(array('timeout' => 300));
     $this->assertTrue(300, $subject->timeout());
     $subject->close();
     unset($subject);
 }
All Usage Examples Of lithium\net\socket\Context::close