udp - Bittorrent PIECE message not received -


basically messages choke, unchoke, have , bitfield, don't receive of piece messages, why so?

i saw old unanswered question also, didn't help. bittorrent protocol implementation: not receiving "piece" messages

there several reasons that. likely:

  • peer should know state, make sure send "interested", "not interested", "choked", "unchoked" messages. similarly, should keep track peer state.
  • you not interested in peer or peer choking or both. can request piece when interested in peer , peer not choking you. otherwise peer should ignore request.
  • peer not have piece requested. in case peer should ignore request well.

this bittorrent specification. here part of log demonstrates required steps first piece:

openning new session between peers. connected <peer addr> handshaked bittorrent protocol utorrent version 2040 received message: bitfield  update 'peer have' bitfield. received message: have 572 mark piece 572 available. ... ... here receive many have messages, skip them ... sending message: interested received message: unchoke sending message: request { piece index = 0, block offset = 0, block length = 16384 } received message: piece { piece index = 0, block offset = 0, block length = 16384 } ... 

as can see utorrent answered piece message.

however, in scenario we've been lucky: peer not unchoke since have limited number of so-called "unchoke slots". 1 tip here: use swarm small ratio of leecher count seeder count. should make debugging easier because peer unchoke more likely.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -