luaposix/luaposix — pull request #82 by zevv (2013-04-12 09:38:19+00:00)
Title: Added socket functions and test script

Socket functions and test script added.

One note:

The various functions taking addresses (bind, connect, sendto) all use string representation which is fed into getaddrinfo(). If using host names instead of numeral notation, getaddrinfo() will perform host resolving, which is convenient, but might not be expected behaviour of connect, bind and sendto. Also when using DNS, only the first resolving result will be used, if more alternatives are available.

In a future version adding a separate function for resolving which allows for more control might me nice.