aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/core/src/main/java/org/spongycastle/crypto/tls/HeartbeatMessageType.java
blob: 2d21a1e8edf56cf79242582f95172e7503ceec9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package org.spongycastle.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;
    }
}