Closed marvelous closed 7 years ago
No, that's currently not supported since mldht manages sockets on its own, bound to individual IP addresses while peer-peer sockets are often bound to the any-local address so there would be some impedance mismatch anyway.
What is the technical need for operating them on the same port? The specs allow tcp+utp to operate on a port separate from the DHT nodes.
Sharing the same socket allows me to send RPCServer.getConsensusExternalAddress in the announces and avoid having an other external port discovery mechanism.
My goal is not to be bittorrent compliant, so I might encapsulate my protocol inside krpc messages.
If you're fine with mldht managing all the IO and sockets for you then I could expose low level hooks for sending and receiving bytebuffers over the same socket.
Don't bother, I will explore using STUN and a separate port first. Thank you for your feedback!
I would like to use the same socket to run the DHT node and to implement an other protocol like uTP. The mldht API does not seem to allow to intercept UDP packets before passing them to mldht (if they start with the magic 'd' ascii character). Is there something I haven't noticed?