connect() public method

public connect ( )
Example #1
0
 /**
  * @group connected
  */
 public function testAcceptsTcpNodelayParameter()
 {
     if (!version_compare(PHP_VERSION, '5.4.0', '>=')) {
         $this->markTestSkipped('Setting TCP_NODELAY on PHP socket streams works on PHP >= 5.4.0');
     }
     $connection = new StreamConnection($this->getParameters(array('tcp_nodelay' => false)));
     $connection->connect();
     $this->assertTrue($connection->isConnected());
     $connection = new StreamConnection($this->getParameters(array('tcp_nodelay' => true)));
     $connection->connect();
     $this->assertTrue($connection->isConnected());
 }
 public function connect()
 {
     $this->tstart = microtime(true);
     parent::connect();
 }