> ## Documentation Index
> Fetch the complete documentation index at: https://hoalulab.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Heartbeat

> Server gửi `PING`; client phải phản hồi `PONG` đúng cấu trúc.



## AsyncAPI

````yaml vi/asyncapi/ssi.2026-07-29.asyncapi.yaml heartbeatStream
id: heartbeatStream
title: Heartbeat
description: Server gửi `PING`; client phải phản hồi `PONG` đúng cấu trúc.
servers:
  - id: production
    protocol: wss
    host: stream.ssi.com.vn
    bindings: []
    variables: []
address: /ws/v3
parameters: []
bindings: []
operations:
  - &ref_2
    id: onPingMessage
    title: Nhận ping
    description: Server gửi heartbeat để kiểm tra kết nối.
    type: send
    messages:
      - &ref_4
        id: pingMessage
        contentType: application/json
        payload:
          - name: Ping heartbeat
            description: Server gửi ping định kỳ.
            type: object
            properties:
              - name: method
                type: string
                description: PING
                required: true
              - name: channel
                type: string
                description: HEARTBEAT
                required: true
              - name: time
                type: string
                description: Thời gian heartbeat theo định dạng `dd-mm-yyyy hh-mm-ss`.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - method
            - channel
            - time
          properties:
            method:
              type: string
              const: PING
              x-parser-schema-id: <anonymous-schema-17>
            channel:
              type: string
              const: HEARTBEAT
              x-parser-schema-id: <anonymous-schema-18>
            time:
              type: string
              description: Thời gian heartbeat theo định dạng `dd-mm-yyyy hh-mm-ss`.
              pattern: ^\d{2}-\d{2}-\d{4} \d{2}-\d{2}-\d{2}$
              x-parser-schema-id: <anonymous-schema-19>
          x-parser-schema-id: <anonymous-schema-16>
        title: Ping heartbeat
        description: Server gửi ping định kỳ.
        example: |-
          {
            "method": "PING",
            "channel": "HEARTBEAT",
            "time": "29-07-2026 09-15-32"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: pingMessage
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: heartbeatStream
  - &ref_1
    id: onPongRequest
    title: Gửi pong
    description: Client phản hồi heartbeat.
    type: receive
    messages:
      - &ref_3
        id: pongRequest
        contentType: application/json
        payload:
          - name: Pong heartbeat
            description: Client phản hồi ping từ server.
            type: object
            properties:
              - name: method
                type: string
                description: PONG
                required: true
              - name: channel
                type: string
                description: HEARTBEAT
                required: true
              - name: time
                type: string
                description: Thời gian heartbeat theo định dạng `dd-mm-yyyy hh-mm-ss`.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - method
            - channel
            - time
          properties:
            method:
              type: string
              const: PONG
              x-parser-schema-id: <anonymous-schema-21>
            channel:
              type: string
              const: HEARTBEAT
              x-parser-schema-id: <anonymous-schema-22>
            time:
              type: string
              description: Thời gian heartbeat theo định dạng `dd-mm-yyyy hh-mm-ss`.
              pattern: ^\d{2}-\d{2}-\d{4} \d{2}-\d{2}-\d{2}$
              x-parser-schema-id: <anonymous-schema-23>
          x-parser-schema-id: <anonymous-schema-20>
        title: Pong heartbeat
        description: Client phản hồi ping từ server.
        example: |-
          {
            "method": "PONG",
            "channel": "HEARTBEAT",
            "time": "29-07-2026 09-15-32"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: pongRequest
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
extensions:
  - id: x-parser-unique-object-id
    value: heartbeatStream
securitySchemes: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.