aboutsummaryrefslogtreecommitdiff
path: root/src/inet.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* chore: Remove the executable permission bit from some source files (#434)Tianjia Zhang2024-06-291-0/+0
|
* fix(inet): Return port as number in getsockname (#392)georgeto2023-11-081-1/+1
|
* fix(build): Use gai_strerrorA not gai_strerror on Windowsrpatters12022-07-271-2/+2
| | | | | | | | | | | * Explicitly call gai_strerrorA (for Windows builds), so that the code work correctly in 32bit or 64bit builds. * Implement GAI_STRERROR macro to deal with Windows vs. Non-Windows compiles for 64-bit. * make usocket.c consistent with other modules that call macro GAI_STRERROR * Use different name not just different case for macro wrapping function Co-authored-by: Caleb Maclennan <caleb@alerque.com>
* inet: pragma visibilityE. Westbrook2019-03-101-21/+13
|
* inet.c: use LUASOCKET_PRIVATEE. Westbrook2019-02-251-12/+14
|
* When zero-timeout, only try first address in connect.Diego Nehab2015-12-031-2/+2
|
* Fixes suggested by @Florob in #147.Diego Nehab2015-08-251-6/+11
|
* New agnostic IPv4 IPv6 functions.Diego Nehab2015-08-221-64/+68
| | | | | Also dealing with EPROTOTYPE Yosemite seems to be throwing at us for no reason.
* New compat.h module implements luaL_setfuncs.Diego Nehab2015-08-211-4/+1
| | | | Makes initialization code simpler everywhere.
* Fix inet_global_getaddrinfo leak of getnameinfoDiego Nehab2015-02-181-0/+1
| | | | Issue #127 closed.
* No need for inet_pton.Diego Nehab2013-06-041-30/+2
|
* Remove warnings. Move windows specific code.unknown2013-05-301-5/+6
|
* Leaving if in src/ but out of build for now.Diego Nehab2013-05-301-76/+55
|
* Export global only if LUA_COMPAT_MODULE defined.Diego Nehab2013-05-291-0/+4
|
* Fix "final" bug in pton and TCP connreset handlingunknown2013-05-281-5/+4
|
* Fixed inet_pton and a new Winsock UDP bug.unknown2013-05-281-6/+11
| | | | | | | | | | | | | inet_pton was copying the entire sockaddr_in struct, rather than just the sin_addr field... I am a bit unsure about the UDP fix, because it may affect TCP as well. On UDP sockets, when a sendto fails, the next receive/receivefrom fails with CONNRESET. I changed sock_recv/sock_recvfrom in wsocket.c to skip the CONNRESET from the recv/recvfrom, hoping that if the socket is TCP, sock_waitfd will get the CONNRESET again. The tests pass, but this should be tested more thoroughly.
* Simplifying getaddrinfo treatment.Diego Nehab2013-05-271-32/+18
|
* Merge branch 'moteus' of https://github.com/moteus/luasocket into moteusunknown2013-05-271-3/+21
|\
| * Fix. setsockname fails with "*" as host.moteus2013-05-271-0/+3
| | | | | | | | Add. test_bind.lua
| * Fix. getaddrinfo returns garbage as address on Windows.moteus2013-05-271-3/+18
| | | | | | | | Add. test_getaddrinfo.lua
* | Fix Visual Studio 2012 projectsunknown2013-05-271-2/+2
|/
* Merge tryconnect6 into inet_tryconnect.Diego Nehab2013-05-261-2/+20
|
* Add MingW support.unknown2013-05-251-43/+37
|
* Added inet_pton/inet_ntop for MinGW on Windows; compiles with Lua52.Paul Kulchenko2013-04-071-0/+50
|
* Remove warnings and fix makefile for Win32.Diego Nehab2012-12-111-6/+6
|
* Fix socket_accept usage to depend on family.Diego Nehab2012-12-111-1/+15
|
* Fix udp:setpeername("*")Diego Nehab2012-08-231-12/+33
| | | | | | | | | | | | | | There seems to be a curious difference between MacOS and Linux and I am not sure if this is documented. When you break a "connection" on Mac OS, you only eliminate the peer association, but the local address remains bound. On Linux, breaking a "connection" eliminates the binding to the local address. Have you guys ever come accross this? Another irritating difference is that connect() returns the error EAFNOSUPPORT on Mac OS. I am going to ignore all errors when the reason for calling connect() is simply to break the "connection".
* socket.connect now implemented in the C coreSam Roberts2012-05-101-12/+42
| | | | | | | This avoid socket.lua duplicating the iteration over the results of getaddrinfo(). Some problems with the C implementation not initializing sockets or the luasocket family have also been fixed, and error reporting made more robust.
* Add a getnameinfo() wrapperFlorian Zeitz2012-05-051-0/+48
| | | | | | | | | This wrapper takes a domain name or an IP as first argument and a service name or port as second argument. Either argument may be nil. It returns a list of names (always only one in the IP case) and a service name.
* Fixed getpeername/getsockname situationDiego Nehab2012-04-241-43/+74
| | | | | | | - Added IPv6 support to getsockname - Simplified getpeername implementation - Added family to return of getsockname and getpeername and added modification to the manual to describe
* Making progress toward a releaseDiego Nehab2012-04-231-4/+2
| | | | | | | | | | Documented headers.lua Update copyright date everywhere Remove RCSID from files Move version back to 2.1 rather than 2.1.1 Fixed url package to support ipv6 hosts Changed "domain" to "family" in tcp and udp structures Implemented getfamily methods
* inet: Honor the strict aliasing ruleFlorian Zeitz2012-04-111-12/+14
|
* Compiles with Lua 5.1.4 and Lua 5.2.0-beta, although the makefile needs ↵Liam Devine2012-04-111-1/+1
| | | | sorting out to take maybe a version number and also the local paths need removing.
* inet: return more useful errorsPaul Aurich2012-04-111-2/+3
|
* inet: refactor getpeername to allocate the struct on the stackPaul Aurich2012-04-111-13/+23
|
* Fix getpeername to work with IPv6 addressesFlorian Zeitz2012-04-111-5/+18
|
* Add support for connecting to IPv6 hostsFlorian Zeitz2012-04-111-18/+24
|
* dns.getaddrinfo: Return proper error messagesFlorian Zeitz2012-04-111-1/+1
|
* dns: Rename toip6() to getaddrinfo() since the old name is misleadingFlorian Zeitz2012-04-111-3/+3
|
* Rework binding IPv6 sockets by harmonizing it with the IPv4 variantFlorian Zeitz2012-04-111-24/+34
|
* Preliminary IPv6 support for v2.1Diego Nehab2012-04-111-3/+49
|
* Saving before big changes to support IPv6.Diego Nehab2011-05-251-2/+1
|
* Before compiling on Windows.Diego Nehab2005-10-071-20/+20
|
* Almost ready to release.Diego Nehab2005-09-291-2/+2
|
* Working on the manual.Diego Nehab2005-06-141-10/+14
|
* Forward server working on Mac OS X...Diego Nehab2005-02-081-1/+0
|
* Fixed a bunch of stuff. Added mike's patches.Diego Nehab2004-07-161-4/+3
|
* Still need to fix windows. :o/Diego Nehab2004-07-151-33/+37
|
* Manual is almost done. HTTP is missing.Diego Nehab2004-06-151-1/+0
| | | | | | | Implemented new distribution scheme. Select is now purely C. HTTP reimplemented seems faster dunno why. LTN12 functions that coroutines fail gracefully.
* Só pra não perder se der merda.Diego Nehab2004-06-041-3/+0
|