I'm trying to implement mainline dht. While implementing I found it easier to use multithreading to handle requests and send requests at the same time. But it's impossible for a singular port to both send and receive at the same time. There's two solutions I thought of, one of those would be using different ports for receiving and sending, however in mainline dht it seems like whenever you send a request, nodes will remember you based on the port you send the request on. Is it possible to still implement a different port for receiving and sending?
Is it possible to receive from one port and send through another in mainline dht?
55 Views Asked by raz At
1
There are 1 best solutions below
Related Questions in SOCKETS
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- My server TCP doesn't receive messages from the client in C
- how is strncpy able to copy from source to empty destination?
- Python Multicast packet receiver stops receiving multicast packets when computer is connected to WiFi
- Python Client-Server Communication with Protocol
- Reversed TLS re-connection issue
- Android 13 & 14 seem to close WebSocket connection, if i put app in background, after ~20s
- Java SocketException: Connection reset,. What is the cause?
- Multipart/form-data with chunked data transfer (ICAP protocol)
- View Socket View
- Client connection timeout during Android & Windows PC communication via sockets
- Browser connect to raw sockets even possible?
- Protocol 43200 after unpacking received data
- Unity SocketIo using Best http2 plugin want to use in webgl
- How does pre-allocating a pool of SocketAsyncEventArgs objects upfront improve the performance of a server application in c#
Related Questions in BITTORRENT
- Is it possible to get hashes of individual 16KB blocks from a v2 torrent file? v1?
- Send the piece request to Udp peer using UDP Tracker Protocol
- Solve the packing error on peer handshake protocol
- Solve the socket error 10060 ,during making a peer handshake
- Problem in debugging custom python libtorrent client - How to add DHT router
- Unhandled Exception during Handshake in BitTorrent protocol implementation
- Error connecting to BitTorrent tracker: Requested download is not authorized for use with this tracker
- How can I index the bittorrent DHT properly for infohashes?
- 'WinError: The remote computer refused the network connection' is caused from BitTorrent project
- npm: cant import bencode module
- Torrent Trackers return port 0 in for peer in peer list
- Sequential downloading and playback of torrents on the server
- Change category of torrent using qBittorrent web API how?
- Trouble with URL encoding torrent's infoHash using JS
- How to download torrent specific files in python code?
Related Questions in DHT
- Implementing find node on torrent kademlia routing table
- Can applications coexist within the same DHT?
- How to find nodes with exact info_hash in Bittorrent DHT?
- How does a bittorent peer accquires info dictionary when magnet URI is provided?
- the make.sh for fastdht not work.When running it shows "nm: /usr/lib/libc_r.so:no such file"
- Consistent Hashing: what about rehashing?
- How does DHT torrent indexing sites scrape infoHashes efficiently?
- 'dht' does not name a type
- Similar to hash values but something that returns an int
- Chord protocol. Distribuited Hash Table (DHT). Peer to peer. (P2P)
- Algorithms for building a peer to peer search engine with distributed database
- Order-keeping queues that can be paused
- IPFS not announcing CIDs on indirect peers and unable to get through cmd as CID is not propagated using DHT
- Libtorrent Logging through python bindings, possible?
- DHT routing library for Java
Related Questions in KADEMLIA
- How do I periodically remove inactive nodes and flush the routing table with the use of kademlia python library?
- which libp2p module do I use to broadcast data to peers in the network e.g blockchain? do I use mdns or kademlia for blockchain?
- Crawl DHT of a private network from outside
- How to implement peer discovery using Kademlia (rust-libp2p)
- Kademlia get_providers() fails to find nodes that start_providing() in Rust libp2p
- Do I remove peers after a certain amount of time?(mainline dht)
- How to find metadata in the dht while only having the Infohash?
- Is it possible to receive from one port and send through another in mainline dht?
- receiving unreadable text while trying to bencode a "find_node" query
- How does the routing table work in mainline dht?
- DHT detection in local network
- Is it possible to compute an approximate size estimate of a kademlia network from a node's k-buckets?
- Node Id generation in storj
- Kademlia DHT finding bucket index for a node
- Bucket splitting exception in Kademlia
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The DHT requires that the same port is used for sending and receiving.
Sockets are thread-safe, you can issue send and receive syscalls to the same socket at the same time.
If you want to load-balance reading across multiple threads you can open multiple sockets bound to the same port via
SO_REUSEPORTbut that shouldn't be necessary because any regular DHT implementation will only see a dozen packets per second, perhaps with short burts into the thousands, something that a single core can comfortably handle.