The MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent class

- « MongoDB\Driver\Monitoring\ServerHeartbeatStartedEvent::isAwaited

- MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent::getDurationMicros »

- PHP Manual
- MongoDB\Driver\Monitoring
- The MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent class

# The MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent class

(mongodb >=1.13.0)

## Introduction

The MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent class encapsulates information about a successful server heartbeat.

## Class synopsis

final class MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent {
/* Methods */
final public getDurationMicros(): int
final public getHost(): string
final public getPort(): int
final public getReply(): object
final public isAwaited(): bool
}

## Table of Contents

- MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent::getDurationMicros — Returns the heartbeat's duration in microseconds
- MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent::getHost — Returns the hostname of the server
- MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent::getPort — Returns the port on which this server is listening
- MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent::getReply — Returns the heartbeat reply document
- MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent::isAwaited — Returns whether the heartbeat used a streaming protocol