I have one of my computers seeding a torrent file on port 45000. I am trying to write a small client in python (or perhaps perl) that helps me to determine the types of messages this client supports for which I need to perhaps do a handshake with the client. In Azureus, this is done using a call like peer.getSupportedMessages(). Is it possible to do this using some library in python or perl?
An example of the returned messages would look like this:
BT_KEEP_ALIVE
BT_PIECE
BT_REQUEST
BT_UNCHOKE
BT_UNINTERESTED
BT_SUGGEST_PIECE
BT_HAVE_ALL
BT_HAVE_NONE
BT_REJECT_REQUEST
BT_ALLOWED_FAST
BT_LT_EXT_MESSAGE
BT_DHT_PORT
lt_handshake
ut_pex