peer-wire-protocol

Bittorrent Peer Wire Protocol implementing in Java

I have a couple of questions regarding the Bittorrent Peer Wire Protocol. I am trying to implement it in Java using this spec. In Peer Wire Protocol section it says that all integers are four byte big endian values. AFAIK java uses big endian. Does that mean say if i want to send a choke message choke:<len=0001><id=0> Do i just write ...

Java Thread Performance

I am working on a bittorrent client. While communicating with the peers the easiest way for me to communicate with them is to spawn a new thread for each one of them. But if the user wants to keep connections with large number of peers that my cause me to spawn a lot of threads. Another solution i thought of is have one thread to itera...