aboutsummaryrefslogtreecommitdiff
path: root/src/usocket.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert "fix(usocket): Fix typo in return value function name"Caleb Maclennan2022-08-311-1/+1
| | | | | | This reverts commit 88c72acd771ac6c96ea7f4e57293307e282ad49f. See discussion on #390
* style(usocket): Remove trailing space at EOLzhaozg2022-08-301-1/+1
|
* fix(usocket): Fix typo in return value function namezhaozg2022-08-301-1/+1
|
* fix(build): Use gai_strerrorA not gai_strerror on Windowsrpatters12022-07-271-1/+1
| | | | | | | | | | | * 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>
* usocket: pragma visibilityE. Westbrook2019-03-101-27/+26
|
* Only use EAI_OVERFLOW, AI_NUMERICSERV if definedMojca Miklavec2019-02-261-0/+2
| | | | | | | | | | | | | Some systems like Mac OS X 10.5 (and lower) do not have EAI_OVERFLOW and AI_NUMERICSERV defined. These variables are used to avoid a potentially slow name resolution for the hostname (which will always be an ip address) and for service name (which will always be an actual port number). The code might be slower, but it should still work. Closes: #242
* usocket.c use LUASOCKET_PRIVATEE. Westbrook2019-02-251-28/+30
|
* Fix typoElliptica2017-04-171-1/+1
|
* New agnostic IPv4 IPv6 functions.Diego Nehab2015-08-221-1/+8
| | | | | Also dealing with EPROTOTYPE Yosemite seems to be throwing at us for no reason.
* Fix cut-paste typo on PIE_HOST_NOT_FOUND.Diego Nehab2015-03-031-30/+30
|
* updated error messages, less error prone, platform independentThijs Schreijer2015-03-031-20/+20
|
* src/usocket: Don't unset/set O_NONBLOCK around listen() or shutdown() calls.daurnimator2014-10-271-4/+0
| | | | | It doesn't effect them. Not true on windows
* src/usocket: Do not setblocking on destroy;daurnimator2014-10-271-1/+0
| | | | | | | This results in unexpected behaviour if the socket has been `dup()`d, as O_NONBLOCK is shared. Close is always 'blocking' anyway See https://github.com/wahern/cqueues/issues/13 for an example use case
* Fix socket_accept usage to depend on family.Diego Nehab2012-12-111-4/+0
|
* socket.connect now implemented in the C coreSam Roberts2012-05-101-1/+1
| | | | | | | 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.
* Reword error msg to distinguish between service and serverSam Roberts2012-05-081-2/+2
| | | | | servname is easily confused with "server name", making it seem as if the server name couldn't be resolved.
* Making progress toward a releaseDiego Nehab2012-04-231-2/+0
| | | | | | | | | | 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
* Merge branch 'git-sam' into diego-sam-mwild-integrationSam Roberts2012-04-111-8/+68
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts in options.c were just due to independent small functions being close to each other. unix.c in mwild was broken, it wasn't using LUASOCKET_API. serial.c needed luaL_reg renamed, and to use LUASOCKET_API. makefile didn't respect standard DESTDIR and prefix makefile variables, and didn't allow LUAV variable to select lua version to build against. I've tested the top-level install-both target builds and installs against both lua5.1 and lua5.2, but not done further testing. Conflicts: README config gem/ltn012.tex makefile src/makefile src/options.c src/options.h src/tcp.c src/usocket.c
| * Bounds check the argument to FD_SETSam Roberts2012-04-111-0/+1
| | | | | | | | | | Failing to check the FD_SET argument against FD_SETSIZE causes undefined behaviour (segfaults, for example).
| * socket_strerror() sometimes maps errno, instead of its argumentSam Roberts2012-04-111-2/+2
| | | | | | | | | | | | | | Looks like a historical bug. Its err argument is an error number, but if it isn't using a custom error message for it, it just calls strerror() with the errno global, effectively ignoring its argument and returning a semi-random string.
| * Add support for serial devices as socket streams on unix.Sam Roberts2012-04-111-0/+60
| |
| * Use poll by default for socket.connect(), instead of select().Sam Roberts2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | Connect timeouts are implemented by waiting on the new socket descriptor. When select() is used for this, it imposes an arbitrary limit on the number of connections that can be made, usually 1024-3. Using poll() removes this limit on the number of simultaneous TCP connections can be made using luasocket. The previous default implementation using select() is available by defining SOCKET_SELECT. Note that using socket.select() always uses select(), so it isn't possible to wait on an arbitrary number of connections at once.
| * Stop returning an error after successful send of zero length UDP packetsSam Roberts2012-04-111-6/+5
| | | | | | | | | | | | | | A zero-length send is invalid with TCP, but well defined with UDP. udp:send"" was returning (nil,"refused"), indicating that it failed when the packet was actually sent. The test script reproduces the bug, and includes a tcpdump of the zero length packet being sent.
* | #ifdef EAI_BADHINTS and EAI_PROTOCOL which don't seem available on my system ↵Matthew Wild2012-04-111-0/+4
| | | | | | | | (Linux/glibc 2.11)
* | Preliminary IPv6 support for v2.1Diego Nehab2012-04-111-1/+22
| |
* | Saving before big changes to support IPv6.Diego Nehab2011-05-251-3/+3
| |
* | New release.Diego Nehab2007-10-131-1/+1
|/
* Crashy bug fixed in recvraw.Diego Nehab2007-06-111-4/+4
| | | | Also fixed returns on closed socket.
* Few tweaks in installation, some missing files, etc.Diego Nehab2005-11-221-1/+2
|
* Changed prefix of function names to match module names.Diego Nehab2005-11-201-1/+2
| | | | Removed some warnings and useless code.
* Before compiling on Windows.Diego Nehab2005-10-071-56/+57
|
* Almost ready to release.Diego Nehab2005-09-291-9/+2
|
* Trying to get non-blocking connect to work.Diego Nehab2005-04-201-0/+1
|
* Apparently, non-blocking connect doesn't work on windows if you use 0Diego Nehab2005-03-111-13/+13
| | | | timeout in the select call...
* Forward server working on Mac OS X...Diego Nehab2005-02-081-7/+19
|
* Bug in poll.Diego Nehab2004-11-291-3/+5
| | | | | Debug garbage in compat-5.1.c. Improvements to the user manual.
* Using poll instead of select by default.Diego Nehab2004-11-271-1/+1
|
* Gonna try my luck on windows...Diego Nehab2004-07-261-8/+8
|
* Fixed a bunch of stuff. Added mike's patches.Diego Nehab2004-07-161-9/+9
|
* Still need to fix windows. :o/Diego Nehab2004-07-151-179/+189
|
* tiny bug in test.Diego Nehab2004-07-021-6/+0
|
* Compiles and runs on windows.Diego Nehab2004-07-021-18/+20
|
* Seems good.Diego Nehab2004-07-011-0/+2
|
* Moving on to beta2.Diego Nehab2004-07-011-211/+123
|
* Fixing send/recv and optimizing.Diego Nehab2004-06-231-18/+27
|
* More adjustments/bugfixes.Diego Nehab2004-06-211-5/+1
|
* Fixing bugs...Diego Nehab2004-06-201-3/+8
|
* Fine tuning the "require" business.Diego Nehab2004-05-301-0/+8
|
* Bug feioso no UDP e possivelmente no TCP também.Diego Nehab2004-05-281-4/+4
|
* Worked on the manual.Diego Nehab2004-02-041-3/+2
| | | | | Implemented stuffing (needs test) Added cddb and qp examples.