We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, as titled. We are trying to get the raw TCP connection to read the file descriptor.
netConn := websocket.NetConn(reqCtx.Context(), wsConn, websocket.MessageText)
We want to use this library in combination with https://github.com/smallnest/epoller
The text was updated successfully, but these errors were encountered:
Our workaround
var netConn net.Conn clientTrace := &httptrace.ClientTrace{ GotConn: func(info httptrace.GotConnInfo) { netConn = info.Conn }, } clientTraceCtx := httptrace.WithClientTrace(requestContext, clientTrace) conn, upgradeResponse, err := websocket.Dial(clientTraceCtx, options.URL, &websocket.DialOptions{ HTTPClient: c.httpClient, HTTPHeader: options.Header, CompressionMode: websocket.CompressionDisabled, Subprotocols: subProtocols, }) if err != nil { return nil, err }
Sorry, something went wrong.
Thanks for sharing your workaround @StarpTech! We'll think about the API but surely we can expose an easier way to grab the raw net.Conn.
Somewhat related: #331
@mafredri thanks and that would be great!
No branches or pull requests
Hi, as titled. We are trying to get the raw TCP connection to read the file descriptor.
We want to use this library in combination with https://github.com/smallnest/epoller
The text was updated successfully, but these errors were encountered: