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
net: DialContextTCP() #21231
Comments
Did you miss https://golang.org/pkg/net/#Dialer.DialContext ? |
@fraenkel no. conn, err := dialer.DialContext(...) Does not allow me to setup local address for connection. |
Sure it can. Set the LocalAddress in the Dialer. |
@fraenkel wow. Thanks! Seems like I really missed this. 👍 |
I don't think so. We just need to adequately highlight the proper APIs that people should use. The original ones were modified to leverage the Context based ones but cannot be removed for compatibility reasons. |
Closing since there doesn't seem to be anything to do here. |
Hello! I've search for some similar issues and found this one but looks like it is stale now.
My issue points to inability to dial via tcp with custom
context.Context
passed.Current implementation of
net.DialTCP()
(actuallynet.dialTCP
) is absolutely ready to receive context for dial, but has no exported wrapper that can receive it.The text was updated successfully, but these errors were encountered: