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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃 [Question]: is it possible to get the file descriptor from fiber websocket? #914

Open
3 tasks done
saifhamdan opened this issue Jan 6, 2024 · 1 comment
Open
3 tasks done
Labels
馃 Question Further information is requested

Comments

@saifhamdan
Copy link

Question Description

I have been using gofiber/websocket for a while now, and I've been reading about how you can increase WebSocket performance by creating an epoll to handle file descriptors. I've tried every possible way to obtain it from *websocket.Conn, but I couldn't find any solution. Has anyone tried this before?

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my questions prior to opening this one.
  • I understand that improperly formatted questions may be closed without explanation.
@saifhamdan saifhamdan added the 馃 Question Further information is requested label Jan 6, 2024
@gaby
Copy link
Member

gaby commented Jan 6, 2024

@saifhamdan When using *websocket.Conn, directly accessing the file descriptor is not straightforward because the WebSocket connection abstracts over the underlying TCP connection. Even when using the standard library intentionally doesn't provide a direct way to access the file descriptor from a net.Conn interface.

You could try asking the fasthttp/websocket folks to provide an example or function for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃 Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants