-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Error: UTP_ECONNRESET #5
Comments
this is probably because utp doesn't support half open connections so when your client calls .end in the pipe the server will stop echoing pending data (similar to doing socket.destroy with tcp). could you hook up re: performance. yes utp-native is currently slower than tcp because i haven't really optimised it yet (primary focus has just been getting things to work) and it's probably always gonna be slower than tcp on a local network / very fast internet. Since tcp runs inside the kernel and utp is running in js and you have a lot of bandwidth on a local network, io might not be the bottleneck. that being said i think we can make it 2-3x faster by solving some easy perf bottlenecks :) i'm gonna add a benchmark so we can start tracking perf overall |
@mafintosh Yes |
@mafintosh I confirm it is probably because utp doesn't support half open connections. Any work around you have in mind? |
you need some sort of overlay protocol to work around this like http. you for hole punching you can use the bittorrent-dht or custom dns servers. it we should probably add some of this stuff to the readme.
|
@mafintosh I will really appreciate an example when you get to your laptop :-) Please keep me posted! Thanks a lot, |
Hey @mafintosh , I am building a sort of overlay protocol to transfer file over UTP. For the moment I made a kind of example/idea/prototype which solve the Here the code: Please, let me know what do you think, and if it make sense to you. Thanks, |
@mafintosh can we add Half Open connection support with utp ? |
👍 for halfOpen connections. Is there any technical limitation of why we couldn't have it on the uTP level? Isn't the ST_FIN packet designed for this purpose also? |
i don't think libutp supports half-open connections even though the protocol might. the only end api exposed is
which closes both the readable and writable end of the connection. |
@mafintosh pointed out to me that libutp finally has half-closed connections -- bittorrent/libutp#102 🎉 \o/ and I see that it was added to utp-native already b0af19f 🎉🎉🎉👏🏽👏🏽👏🏽 |
Hello @mafintosh,
I am trying to use
utp-native
for a p2p file transfer application.I am testing with the following code:
[Server]
[Client]
Before the transfer is completed the server crash with
Error: UTP_ECONNRESET
.Any idea how can I solve it? As well, it seems quite slower than a normal TCP connection. Any idea?
I am running these scripts with Node.js 4.2.4 on OSX El Capitan.
Thanks in advance,
Jacopo
The text was updated successfully, but these errors were encountered: