Class DhtPktAlert
java.lang.Object
com.frostwire.jlibtorrent.alerts.AbstractAlert<dht_pkt_alert>
com.frostwire.jlibtorrent.alerts.DhtPktAlert
- All Implemented Interfaces:
Alert<dht_pkt_alert>
This alert is posted every time a DHT message is sent or received. It is
only posted if the ``alert::dht_log_notification`` alert category is
enabled. It contains a verbatim copy of the message.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.frostwire.jlibtorrent.alerts.AbstractAlert
alertFields inherited from interface com.frostwire.jlibtorrent.alerts.Alert
ALL_CATEGORIES, BLOCK_PROGRESS_NOTIFICATION, CONNECT_NOTIFICATION, DHT_LOG_NOTIFICATION, DHT_NOTIFICATION, DHT_OPERATION_NOTIFICATION, ERROR_NOTIFICATION, FILE_PROGRESS_NOTIFICATION, INCOMING_REQUEST_NOTIFICATION, IP_BLOCK_NOTIFICATION, PEER_LOG_NOTIFICATION, PEER_NOTIFICATION, PERFORMANCE_WARNING, PICKER_LOG_NOTIFICATION, PIECE_PROGRESS_NOTIFICATION, PORT_MAPPING_LOG_NOTIFICATION, PORT_MAPPING_NOTIFICATION, SESSION_LOG_NOTIFICATION, STATUS_NOTIFICATION, STORAGE_NOTIFICATION, TORRENT_LOG_NOTIFICATION, TRACKER_NOTIFICATION, UPLOAD_NOTIFICATION -
Method Summary
Modifier and TypeMethodDescriptionWhether this is an incoming or outgoing packet.node()The DHT node we received this packet from, or sent this packet to (depending ondirection()).byte[]pktBuf()Returns a copy of the packet buffer and size of the packet, respectively.
-
Method Details
-
pktBuf
public byte[] pktBuf()Returns a copy of the packet buffer and size of the packet, respectively. This buffer is only valid for as long as the alert itself is valid, which is owned by libtorrent and reclaimed whenever pop_alerts() is called on the session. -
direction
Whether this is an incoming or outgoing packet.- Returns:
- the direction
-
node
The DHT node we received this packet from, or sent this packet to (depending ondirection()).- Returns:
- the node endpoint
-