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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request documentation on poll_fd to be updated #4319

Closed
amitmurthy opened this issue Sep 20, 2013 · 4 comments
Closed

request documentation on poll_fd to be updated #4319

amitmurthy opened this issue Sep 20, 2013 · 4 comments
Labels
docs This change adds or pertains to documentation

Comments

@amitmurthy
Copy link
Contributor

Other than the fact that UV_READABLE and UV_WRITABLE are no longer required, the type of fd is not very clear.

I am guessing fd is a RawFD. Will it be the same for a Windows socket too? Or is it a WindowsRawSocket type. While WindowsRawSocket is exported, I don't see a constructor for the same, as exists for RawFD.

@JeffBezanson
Copy link
Member

WindowsRawSocket is only actually defined on windows.

@amitmurthy
Copy link
Contributor Author

So, if I am using poll_fd on sockets, and I need to write portable code, should it should be something like

@unix_only fd_obj = RawFD(s)
@windows_only fd_obj = WindowsRawSocket(s) 
poll_fd(fd_obj ....)

where s is a unix socket or a Windows socket handle depending upon the platform?

@JeffBezanson
Copy link
Member

@loladiro what do you suggest?

@amitmurthy
Copy link
Contributor Author

@loladiro , can you confirm if poll_fd supports Windows socket handles, and if so, do I pass it in as is or do I have to wrap it with RawFD / WindowsRawSocket .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

2 participants