is_connected() public method

Method to check if a socket connection exists.
Since: 3.4
public is_connected ( ) : boolean
return boolean True if connected
Beispiel #1
0
 /**
  * Should return correct status of OpenSRS Base socket.
  */
 public function testIsConnected()
 {
     $base = new Base();
     // Should not be connected until we connect
     $this->assertFalse($base->is_connected());
     $this->invokeMethod($base, 'init_socket');
     // now we should be connected
     $this->assertTrue($base->is_connected());
 }