public class SubscribePacket extends TopicPacket
topicflags, fromMQTT_CHARSET, pTYpeNames| Constructor and Description |
|---|
SubscribePacket(byte[] raw,
byte flags,
IPacketAddress from)
Construct from incoming UDP data.
|
SubscribePacket(String topic)
Create packet to be sent.
|
SubscribePacket(String topic,
byte flags)
Create packet to be sent.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getType()
Get packet type byte, as sent over the net (& 0xF0).
|
byte[] |
toBytes()
Generate network representation of packet to be sent.
|
String |
toString() |
getTopic, ifTopicIsapplyTTRs, getFlags, getFrom, getPacketNumber, getReplyToPacketNumber, recv, recvSocket, send, send, send, send, setPacketNumber, setReplyToPacketNumberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdecodeTopicLen, decodeTTRs, encodeTotalLength, encodeTTR, fromBytes, getPacketTypeNamepublic SubscribePacket(byte[] raw,
byte flags,
IPacketAddress from)
raw - Data from UDP packet, starting after packet type and length.flags - Flags from packet header.from - Source IP address.public SubscribePacket(String topic, byte flags)
topic - Topic string.flags - Protocol flags.public SubscribePacket(String topic)
topic - Topic string.public byte[] toBytes()
IPacketpublic String toString()
toString in class GenericPacketpublic int getType()
IPacketCopyright © 2019. All rights reserved.