I’m stuck on Stage #ND2.
I’ve am sending the right interested message but not able to receive the correct unchoke message. Here’s the code snippet
def send_interested_message
bitfield_message = @client.recv(1024) # we will not be using this
message = "\x00\x00\x00\x01\x02"
@client.puts(message)
binding.irb
response = @client.recv(1024)
expected_response = "\x00\x00\x00\x01\x01".bytes
if (response == expected_response)
puts 'Unchoked response received'
end
end
This is what I receive
irb(#<Peer:0x00007f33b9dd0718>):001> response = @client.recv(1024)
=> "\x00\x00\x00\x00"
Is it because I don’t have subscription?