How can I limit data transfer to direct connections? #6051
Replies: 1 comment 4 replies
-
There is no direct peer discovery when calling
You can increase the size of the data transmission on the relay server side if needed. You could also wait until dcutr emits an event stating that the connection was established then proceed to send the request from there. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building a file sharing app that uses both mdns and kademlia for peer discovery. As it's supposed to run on consumer devices, I also use relays and dcutr to establish direct connections.
The actual transfer is done using request-response. If my understanding is correct, I can just use
send_request
on the request-response behaviour, and it will automatically trigger peer discovery via kademlia, if that peer isn't connected. Once the peer is found, it is dialed and the data is sent.My issue is that this initial connection is most likely going to be a relayed one, and the relay's limit will not permit me to send a file of any significant size. So I wonder how I would ensure that the data is only sent via the direct connection that dcutr will attempt to establish, and only if dcutr succeeds at that. I do not want to send any data via the relay. Is that currently possible?
Beta Was this translation helpful? Give feedback.
All reactions