You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with MonoTorrent this week to figure out and explore various BitTorrent functionality for some of my existing C# tooling.
However, I'm experiencing a headache when it comes to the DhtEngine.
I can stand up one instance of the MonoTorrent DhtEngine listening on one port and an another on another port on the same machine.
I tell instance A that a peer is available on instance B by loading it in during engine.StartAsync. And I walk through under a debugger and observe Instance A will send the UDP FindNode message correctly. I can also breakpoint inside Instance B and watch it receive the FindNode message and head into MessageLoop.ReceiveMessage.
Is this intentional? I would think that this loop should also be responding to fresh queries from others, not just responses to its own outbound messages.
Something like
if (rawResponse is QueryMessage q) {
q.Handle (Engine, node);
}
stuck inside that loop as well +/- the other event and logging handlers that I have to admit I don't completely grok on first read.
Thanks for your time!
The text was updated successfully, but these errors were encountered:
I've been playing around with MonoTorrent this week to figure out and explore various BitTorrent functionality for some of my existing C# tooling.
However, I'm experiencing a headache when it comes to the
DhtEngine
.I can stand up one instance of the MonoTorrent
DhtEngine
listening on one port and an another on another port on the same machine.I tell instance A that a peer is available on instance B by loading it in during
engine.StartAsync
. And I walk through under a debugger and observe Instance A will send the UDPFindNode
message correctly. I can also breakpoint inside Instance B and watch it receive theFindNode
message and head intoMessageLoop.ReceiveMessage
.monotorrent/src/MonoTorrent.Dht/MonoTorrent.Dht/MessageLoop.cs
Line 262 in 9e98a44
However, inside that method, it looks like it does the following:
It seems to have no provisions to handle any incoming message that's derived from
QueryMessage
.Further, the only call to the
Handle
virtual method that all these messages implement seems to be locked behind the "Response" flow of this loopmonotorrent/src/MonoTorrent.Dht/MonoTorrent.Dht/MessageLoop.cs
Line 302 in 9e98a44
Is this intentional? I would think that this loop should also be responding to fresh queries from others, not just responses to its own outbound messages.
Something like
stuck inside that loop as well +/- the other event and logging handlers that I have to admit I don't completely grok on first read.
Thanks for your time!
The text was updated successfully, but these errors were encountered: