php8.5
Home/ Manual/ driver / monitoring/ The MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent class

The MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent class

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

Intro

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

Class synopsis

class MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent { }

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.

duration

The duration of the heartbeat in microseconds. The duration is a calculated value that includes the time to send the message and receive the response from the server.

reply

The reply document returned by the server.

Changelog

VersionDescription
PECL mongodb 2.3.0Added public readonly properties. The duration property replaces the getDurationMicros method.

Serverheartbeatsucceededevent

In this section

Source: reference/mongodb/mongodb/driver/monitoring/serverheartbeatsucceededevent.xml · from the official PHP manual (php/doc-en)