Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent::isAwaitedMongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent::getHost>
^MongoDB\Driver\MonitoringLast updated: Mon, 26 Oct 2026

The MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent class

(mongodb >=1.13.0)

Introduction

The MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent class encapsulates information about a started server heartbeat (i.e. » hello command issued through » server monitoring).

Class synopsis

final class MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent {
/* Properties */
public readonly string $host;
public readonly int $port;
public readonly bool $awaited;
/* Methods */
final public function getHost(): string
final public function getPort(): int
final public function isAwaited(): bool
}

Properties

host

The hostname of the server.

port

The port of the server.

awaited

Whether the heartbeat used a streaming protocol. The extension does not use the streaming protocol for monitoring, so this method will always return false.

Changelog

Version Description
PECL mongodb 2.3.0 Added public readonly properties.

Table of Contents


<MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent::isAwaitedMongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent::getHost>
^MongoDB\Driver\MonitoringLast updated: Mon, 26 Oct 2026