org.klomp.snark
Class ExtensionHandler
java.lang.Object
org.klomp.snark.ExtensionHandler
abstract class ExtensionHandler
- extends Object
REF: BEP 10 Extension Protocol
- Since:
- 0.8.2
- Author:
- zzz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID_HANDSHAKE
public static final int ID_HANDSHAKE
- See Also:
- Constant Field Values
ID_METADATA
public static final int ID_METADATA
- See Also:
- Constant Field Values
TYPE_METADATA
public static final String TYPE_METADATA
- See Also:
- Constant Field Values
ID_PEX
public static final int ID_PEX
- See Also:
- Constant Field Values
TYPE_PEX
public static final String TYPE_PEX
- not ut_pex since the compact format is different
- See Also:
- Constant Field Values
ExtensionHandler
ExtensionHandler()
getHandshake
public static byte[] getHandshake(int metasize)
- Parameters:
metasize
- -1 if unknown
- Returns:
- bencoded outgoing handshake message
handleMessage
public static void handleMessage(Peer peer,
PeerListener listener,
int id,
byte[] bs)
sendPEX
public static void sendPEX(Peer peer,
List<Peer> pList)
- added.f and dropped unsupported
- Parameters:
pList
- non-null- Since:
- 0.8.4