lithium\net\socket\Context::eof PHP Méthode

eof() public méthode

End of file test for this socket connection. Does not apply to this implementation.
public eof ( ) : boolean
Résultat boolean Success.
    public function eof()
    {
        if (!is_resource($this->_resource)) {
            return true;
        }
        return feof($this->_resource);
    }

Usage Example

Exemple #1
0
 public function testWriteAndRead()
 {
     $stream = new Context($this->_testConfig);
     $this->assertTrue(is_resource($stream->open()));
     $this->assertTrue(is_resource($stream->resource()));
     $response = $stream->send(new Request(), array('response' => 'lithium\\net\\http\\Response'));
     $this->assertTrue($response instanceof Response);
     $this->assertEqual(trim(file_get_contents($this->_testUrl)), trim($response->body()));
     $this->assertTrue($stream->eof());
 }
All Usage Examples Of lithium\net\socket\Context::eof