Skip to content
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

Revamp - Update libp2p-utp to follow latest interface-connection and interface-transport #74

Merged
merged 6 commits into from
Mar 19, 2018

Conversation

daviddias
Copy link
Member

WIP

@ghost ghost assigned daviddias Feb 7, 2018
@ghost ghost added the status/in-progress In progress label Feb 7, 2018

// TODO Unfortunately utp has no notion of gracious socket closing
// This feature needs to be shimmed on top to make it a proper libp2p
// transport
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This continues to be the crux to support utp. libp2p currently expect gracious connection closing to be supported. We either remove this requirement or add a shim to libp2p-utp.

Copy link
Member

@mkg20001 mkg20001 Apr 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: Calling socket.end() might fix it... investigating
https://github.com/mafintosh/utp-native/blob/master/src/socket_wrap.cc#L183-L186

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does send fin, but for some reason only from 1 side
screenshot
utp_traffic.pcapng.gz

Copy link
Member

@mkg20001 mkg20001 Apr 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another update: server.close() never emits the close event.
Edit: Didn't look in the JS code, only C++

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/net-api.js:261:    socket.end() // utp does not support half open

Just found this.

@daviddias
Copy link
Member Author

Merging as this PR gets it closer to the final state, however the issue with gracious closing is still present. Tracking it here #19

@daviddias daviddias merged commit 19cb17c into master Mar 19, 2018
@ghost ghost removed the status/in-progress In progress label Mar 19, 2018
@daviddias daviddias deleted the revamp branch March 19, 2018 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants