public function testPidSetters() { $this->connection->setParentPid(10); $this->assertSame(10, $this->connection->getParentPid()); $this->connection->setPid(10); $this->assertSame(10, $this->connection->getPid()); }
/** * Adds connection to list and sets connection to master mode * * @param Connection $connection * * @return $this */ public function addConnection(Connection $connection) { $connection->setMasterMode(); $connection->onPacketReceived([$this, 'receivedPacket']); $this->connections[$connection->getPid()] = $connection; return $this; }