-
Notifications
You must be signed in to change notification settings - Fork 284
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
cannot pass TLSSocket to child process #865
Comments
You can't, TLSSockets have process-specific state. What you can do is transfer the |
Thanks @bnoordhuis, do you know which event can I get the |
You mean in process B?
That wouldn't do any good. Once the TLS handshake starts, it's too late. |
@bnoordhuis actually, you mentioned that's possible to get the |
The key point is that you start a plain TCP server (no TLS) in process A. An incoming connection is handed off to process B which wraps it in a |
What you can do is transfer the net.Socket instance before the TLS handshake is initiated: start a normal net.Server in process A, send socket to process B, call new TLSSocket(socket) in B. |
In theory it is possible, as TLS Socket has ability to do session resumption.
However, unless node makes this process easier, it is little difficult to get it working. |
How can I pass a TLSSocket to a child process? (created from
"https"
module)I'm having this issue:
Pseudo-code:
This works fine using
"http"
module. The error happens only when using"https"
.Thanks in advance.
The text was updated successfully, but these errors were encountered: