-
-
Notifications
You must be signed in to change notification settings - Fork 429
Exposes socket connection error into pony level #1520
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
Conversation
Exposes socket connection error into pony level * net/tcp_connection_notify: added `connect_error` method - extended version of `connect_failed`
|
This fails on Windows. |
|
Change On Windows |
[fix] lang/socket.c (pony_os_socket_error): cast optval to suite
Windows `getsockopt()` API
|
Fixed, should work on Windows |
|
It looks like this breaks code which depends on Also, I think a change like this needs to go through the RFC process, to get community input - especially for a breaking change like this. |
|
It does not break existing code with Btw it could be useful to have something like |
|
I'm very new to pony, don't know the procedures needed to accept the code. I see there is RFC 23 already exist with related subject |
Sorry, I should have provided a better explanation. For an API change like this, we'd like to see an RFC first, so we can get community input about the best approach. The hope is that with more eyes on the process, coming from different perspectives and thinking about different use cases, we're likely to come to better solutions than individuals will, leading to better and more stable APIs overall. The process for creating an RFC is described here: https://github.com/ponylang/rfcs/blob/master/README.md The TLDR is that you create a pull request with the RFC, get community input on the idea and the approach, then get it accepted for work. We try not to have the process be too formal, because we don't want to slow down innovation too much, but we do want to slow things down a little bit to get you and the rest of us thinking seriously about the motivation for the idea, impact of the change and the best way to go about it. If you need any help figuring out the RFC process, please let us know. We can discuss more in the RFC, but I personally get the feeling that exposing the errno directly is likely to be too low-level. Ideally, the errors could be expressed somehow in the Pony type system instead of as (platform dependent?) numbers. We do something like this both in the |
|
aha, thanks. Will try to compose RFC |
97b1943 to
21d37aa
Compare
|
As the RFC for this is now open, I'm closing this. |
connect_errormethod -extended version of
connect_failed