aboutsummaryrefslogtreecommitdiff
path: root/src/udp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* udp: pragma visibilityE. Westbrook2019-03-101-5/+1
|
* Only use EAI_OVERFLOW, AI_NUMERICSERV if definedMojca Miklavec2019-02-261-1/+4
| | | | | | | | | | | | | 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
* udp.c: use LUASOCKET_PRIVATEE. Westbrook2019-02-251-3/+5
|
* add options:surenyi2018-03-251-0/+4
| | | | | | | get/set : recv-buffer-size get/set : send-buffer-size Signed-off-by: surenyi <surenyi82@163.com>
* Create socket on first sendto if family agnostic udp() was usedNatanael Copa2017-01-251-0/+21
| | | | | | | Create socket and set family on first sendto() if udp() was created without address family. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* Added gettimeout for completeness.Diego Nehab2016-03-041-0/+7
| | | | | Also documented. Rordered manuals so order is alphabetical.
* Changed buffer-per-socket to buffer-per-operation.Diego Nehab2015-10-061-31/+27
| | | | | | | | This is a difficult tradeoff to measure. I think large datagrams won't be used very frequently. So it is better to not lock a large buffer to each socket object and instead allocate and deallocate for each operation receiving a datagram larger than UDP_DATAGRAMSIZE.
* Added support for arbitrary datagram sizes.Diego Nehab2015-10-051-21/+37
| | | | | The maximum size is still constant per UDP object, but the size can be speficied at creation time.
* Fixes suggested by @Florob in #147.Diego Nehab2015-08-251-31/+21
|
* New agnostic IPv4 IPv6 functions.Diego Nehab2015-08-221-4/+15
| | | | | Also dealing with EPROTOTYPE Yosemite seems to be throwing at us for no reason.
* Merge pull request #141 from cjtallman/masterDiego Nehab2015-08-211-0/+4
|\ | | | | Added missing options for UDP getoption.
| * Added missing options for UDP getoption.cjtallman2015-06-111-0/+4
| | | | | | | | | | | | Documentation says "dontroute", "broadcast", "reuseaddr", and "reuseport" are supported as arguments to getoption, however their implementations were missing.
* | New compat.h module implements luaL_setfuncs.Diego Nehab2015-08-211-4/+1
|/ | | | Makes initialization code simpler everywhere.
* Make local function udp_strerror() static.Stephan Gatzka2014-12-211-1/+1
|
* Remove warnings. Move windows specific code.unknown2013-05-301-5/+7
|
* Leaving if in src/ but out of build for now.Diego Nehab2013-05-301-97/+60
|
* Add. Allow get `error` option to socket.moteus2013-05-291-0/+1
|
* Export global only if LUA_COMPAT_MODULE defined.Diego Nehab2013-05-291-0/+4
|
* Typo fixed.Diego Nehab2013-05-281-1/+1
|
* Fixed inet_pton and a new Winsock UDP bug.unknown2013-05-281-60/+62
| | | | | | | | | | | | | 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.
* Fix wrong usage of inet_pton.unknown2013-05-271-2/+2
|
* Merge tryconnect6 into inet_tryconnect.Diego Nehab2013-05-261-1/+2
|
* Add MingW support.unknown2013-05-251-17/+17
|
* Remove warnings and fix makefile for Win32.Diego Nehab2012-12-111-2/+2
|
* Fix udp:setpeername("*")Diego Nehab2012-08-231-16/+19
| | | | | | | | | | | | | | 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".
* Add IPv6 support to udp:receivefrom()Florian Zeitz2012-07-181-16/+54
|
* Add IPv6 support to udp:sendto()Florian Zeitz2012-07-171-9/+30
|
* Fixed getpeername/getsockname situationDiego Nehab2012-04-241-2/+2
| | | | | | | - 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-8/+23
| | | | | | | | | | 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-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Receive of zero for UDP is now possible.Sam Roberts2012-04-111-0/+6
| | | | | | | | | | Previously, receive of zero was considered to be "closed", but that is only true for stream-based protocols, like TCP.
* | Compiles with Lua 5.1.4 and Lua 5.2.0-beta, although the makefile needs ↵Liam Devine2012-04-111-2/+2
| | | | | | | | sorting out to take maybe a version number and also the local paths need removing.
* | Add support for connecting to IPv6 hostsFlorian Zeitz2012-04-111-15/+22
| |
* | Add support for the IPV6_V6ONLY socket option defaulting to on.Florian Zeitz2012-04-111-0/+6
| |
* | Rework binding IPv6 sockets by harmonizing it with the IPv4 variantFlorian Zeitz2012-04-111-5/+22
| |
* | Fix two crashes and add -Wshadow so that this can't happen again.Paul Aurich2012-04-111-3/+3
| | | | | | | | | | The two crashes are the s/const char *// changes in tcp.c. The rest is cleanup so it will build.
* | Preliminary IPv6 support for v2.1Diego Nehab2012-04-111-1/+1
| |
* | Decent makefiles!Diego Nehab2009-05-271-11/+30
|/
* Before compiling on Windows.Diego Nehab2005-10-071-44/+44
|
* Almost ready to release.Diego Nehab2005-09-291-2/+2
|
* Wrong class...Diego Nehab2005-04-131-1/+1
|
* Almost ready for beta3Diego Nehab2004-11-271-1/+2
|
* Still need to fix windows. :o/Diego Nehab2004-07-151-27/+27
|
* Moving on to beta2.Diego Nehab2004-07-011-56/+49
|
* More adjustments/bugfixes.Diego Nehab2004-06-211-3/+3
|
* Runs on Linux.Diego Nehab2004-06-151-0/+8
|
* Manual is almost done. HTTP is missing.Diego Nehab2004-06-151-4/+1
| | | | | | | 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-2/+1
|
* Bug feioso no UDP e possivelmente no TCP também.Diego Nehab2004-05-281-4/+8
|