net: DialContextTCP() #21231
Closed
net: DialContextTCP() #21231
Labels
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: