protected function getPort(Connection $conn) { $id = spl_object_hash($conn); return $this->ports[$id]; }