summaryrefslogtreecommitdiffstats
path: root/bcprov/src/main/java/org/bouncycastle/crypto/tls/HeartbeatMessageType.java
blob: f1a3b43a47f5b84ac20ef33a3ee1cbbfa304fd42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package org.bouncycastle.crypto.tls;

/*
 * RFC 6520 3.
 */
public class HeartbeatMessageType
{
    public static final short heartbeat_request = 1;
    public static final short heartbeat_response = 2;

    public static boolean isValid(short heartbeatMessageType)
    {
        return heartbeatMessageType >= heartbeat_request && heartbeatMessageType <= heartbeat_response;
    }
}