diegonehab/luasocket — pull request #43 by moteus (2013-05-29 10:39:47+00:00)
Title: Add. Allow get `error` option to socket.

Problem is:
```Lua
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?