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

TLS Support through rustls-wasm #1090

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Conversation

ProgrammerIn-wonderland
Copy link
Contributor

No description provided.

@ProgrammerIn-wonderland
Copy link
Contributor Author

Can't believe my eyes but it really is here finally
API use example

const socket = new puter.net.tls.TLSSocket("google.com", 443);
socket.on("data", (data) => {
    console.log(new TextDecoder().decode(data))
})
socket.on("open", (data) => {
    socket.write(new TextEncoder().encode("GET / HTTP/1.1\r\nHost: google.com\r\n\r\n"));
})
socket.on("error", (e) => {
    console.log(e)
})

@jelveh jelveh merged commit 4fd6da9 into HeyPuter:main Jan 15, 2025
4 checks passed
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