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

Add. Allow get error option to socket. #43

Merged
merged 1 commit into from May 29, 2013

Conversation

moteus
Copy link
Contributor

@moteus moteus commented May 29, 2013

Problem is:

sock:settimeout(0)
-- try connect to unreacheble host
sock:connect(host, port)         -- return timeout
socket.select(nil, {sock}, 100) -- return timeout and empty socket table
-- and to detect that this is connect error we need test SO_ERROR option
sock:getoption("error") -- i get 'connection refused' on WinXP

Full test example see in test/test_socket_error.lua
May be we should return from select third table with socket errors?

diegonehab added a commit that referenced this pull request May 29, 2013
Add. Allow get `error` option to socket.
@diegonehab diegonehab merged commit 5341131 into lunarmodules:unstable May 29, 2013
@moteus moteus deleted the moteus-getopt-error branch May 29, 2013 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants