public class PingFrame extends Frame
| Modifier and Type | Field and Description |
|---|---|
static int |
PING_LENGTH |
DEFAULT_MAX_LENGTH, EMPTY_ARRAY, HEADER_LENGTH, MAX_MAX_LENGTH| Constructor and Description |
|---|
PingFrame(boolean reply)
Creates a PING frame with an empty payload.
|
PingFrame(byte[] payload,
boolean reply)
Creates a PING frame with the given
payload. |
PingFrame(long value,
boolean reply)
Creates a PING frame with the given
long value as payload. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getPayload() |
long |
getPayloadAsLong() |
boolean |
isReply() |
public static final int PING_LENGTH
public PingFrame(boolean reply)
reply - whether this PING frame is a replypublic PingFrame(long value,
boolean reply)
long value as payload.value - the value to use as a payload for this PING framereply - whether this PING frame is a replypublic PingFrame(byte[] payload,
boolean reply)
payload.payload - the payload for this PING framereply - whether this PING frame is a replyCopyright © 1995–2017 Webtide. All rights reserved.