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

Implement TCP and UDP sockets in parent process #108

Closed
wants to merge 5 commits into from

Conversation

sammacbeth
Copy link
Contributor

The current TCPSocket and UDPSocket implements run in the extension child process. This is fine for debugging, but we found that when running in a release browser with the process sandbox enabled then this process was blocked from opening sockets on Mac and Linux, meaning the APIs did not work.

This PR fixes this issue by implementing both TCPSocket and UDPSocket APIs in the parent process. The API exposed by the child to the extension has not changed, but now everything is shipped up to the parent, which then pushes data back to the child.

  • Whether this introduces an additional performance cost, I do not know. I didn't do any performance benchmarks, but also didn't see much change in the dat-webext extension after adopting these changes.
  • The original test suite is passing as-is, but there may be untested regressions I have overlooked. I'm not 100% that the error handling behaves as before.
  • I omitted flow types for the internal parent-process APIs. If you think they're useful I could add that. The flow check is passing at the moment.

@sammacbeth sammacbeth closed this Feb 19, 2020
@soyuka
Copy link

soyuka commented Feb 19, 2020

Are you stopping the work on the matter or just moving on to another repository?

Nvm libdweb#1

@sammacbeth
Copy link
Contributor Author

@soyuka See #109 (comment) for context.

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