-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Udp support #728
Udp support #728
Conversation
We need to modify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shargon,it looks interesting and more organized.
What are the next changes? For example, at RemoteNode?
Ok! maybe we should add some |
check fe42fcd for the refactor of |
When does a node actively send UDP messages? I didn't find it in the code. |
Only it response for udp message, it never start sending |
But who send it first? If no one send UDP, the functions are not used. |
If you want to send a tx to other node (by other client for example) you will receive and be able to response. Is like Websocket, listen and response |
Both UDP and TCP have a maximum packet size of (about) 64KiB. And the IP layer handles fragmentation anytime the packet is larger than the MTU, there is not really a difference here between UDP and TCP.
Yes absolutely 👍 Also keep in mind that any bidirectional traffic between a node and a client behind NAT would require things like NAT traversal with keep-alives. Trust me that this will be a huge pain in many scenario's. For broadcasting unidirectional packets like transactions UDP can be great though and it will give you much better performance. Just sending your transaction to many nodes at once and stop caring about it. For anything else, don't mind UDP and just keep using TCP 😉 |
If you want to send transactions to other nodes, you'll need to send |
How about the RPC |
Udp messages could be received in wrong order, so we can't combine it. My first idea with udp is only for a listener, and a faster way of receive some messages, not all of them |
I think it's difficult to use UDP MultiCast on Internet. Without MultiCast, what is the use of UDP for us? |
Not to many :P If you wish, i can remove all the udp functionality, and maintain the other changes. |
Conflicts |
Codecov Report
@@ Coverage Diff @@
## master #728 +/- ##
==========================================
- Coverage 38.39% 38.39% -0.01%
==========================================
Files 176 178 +2
Lines 12465 12526 +61
==========================================
+ Hits 4786 4809 +23
- Misses 7679 7717 +38
Continue to review full report at Codecov.
|
I think we can treat it as a "connection" if two nodes exchange verison via udp. |
If we decide that this is not useful, we can close this pr |
Also, i included the possibility of listen only on certain interfaces, not in all