Commit Graph

54 Commits

Author SHA1 Message Date
Paul Kulchenko
22b8202d70
fix(wsocket): Properly report CONNRESET (#81) 2023-11-09 14:00:09 +03:00
rpatters1
5a7e3f0888
fix(build): Use gai_strerrorA not gai_strerror on Windows
* 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>
2022-07-27 09:51:35 +03:00
Caleb Maclennan
6952262e6a
style: Use C-style comment syntax throughout (#309)
Co-authored-by: Denise Cullassnekuff <19711487+BlackCutpoint@users.noreply.github.com>
2022-03-18 17:54:11 +03:00
E. Westbrook
21514304be wrap visibility pragmas in #ifndef _WIN32 2019-03-10 00:04:20 -07:00
E. Westbrook
8b2dcdcf7d usocket: pragma visibility 2019-03-10 00:04:20 -07:00
E. Westbrook
f8183bab87 usocket.c: use LUASOCKET_PRIVATE 2019-02-25 16:04:29 -07:00
Diego Nehab
288219fd6b Update to Visual Studio 2017. 2018-08-22 17:37:32 -03:00
Diego Nehab
e75444ccd1 New compat.h module implements luaL_setfuncs.
Makes initialization code simpler everywhere.
2015-08-21 15:39:34 -03:00
Thijs Schreijer
d3ed08616b updated error messages, less error prone, platform independent 2015-03-03 21:17:06 +01:00
unknown
2d51d61688 Fix "final" bug in pton and TCP connreset handling 2013-05-28 17:27:06 +08:00
unknown
734cc23e1f Fixed inet_pton and a new Winsock UDP bug.
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.
2013-05-28 00:09:30 +08:00
unknown
bb0b31301a Add MingW support. 2013-05-25 18:07:38 +08:00
Diego Nehab
72a5347f97 Remove warnings and fix makefile for Win32. 2012-12-11 17:43:49 -02:00
Diego Nehab
618ce43ee3 Fix socket_accept usage to depend on family. 2012-12-11 16:35:27 -02:00
Eric Wing
5c467b3954 Copied socket_gaistrerror implementation from usocket to wsocket to allow Windows version to compile because it is missing the function. EAI_OVERFLOW and EAI_SYSTEM are commented out because they don't exist on Windows. 2012-11-20 12:58:52 -08:00
Diego Nehab
f960b3872a Making progress toward a release
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
2012-04-23 00:18:45 +08:00
Diego Nehab
2778766d67 Preliminary IPv6 support for v2.1 2012-04-11 13:25:11 -07:00
Diego Nehab
3a8ba90dfb Saving before big changes to support IPv6. 2011-05-25 20:57:22 +00:00
Diego Nehab
3cd10f5ab6 Crashy bug fixed in recvraw.
Also fixed returns on closed socket.
2007-06-11 23:44:54 +00:00
Diego Nehab
f20f4889bf Changed prefix of function names to match module names.
Removed some warnings and useless code.
2005-11-20 07:20:26 +00:00
Diego Nehab
f4dadea763 Before compiling on Windows. 2005-10-07 04:40:59 +00:00
Diego Nehab
a32c6d9140 Almost ready to release. 2005-09-29 06:11:42 +00:00
Diego Nehab
773e35ced3 Compiled on Windows. Fixed a bunch of stuff. Almost ready to release.
Implemented a nice dispatcher! Non-blocking check-links and forward server
use the dispatcher.
2005-08-23 05:53:14 +00:00
Diego Nehab
0c3cdd5ef2 Final push for release... 2005-08-12 05:56:32 +00:00
Diego Nehab
2a00a5ad50 Trying to get non-blocking connect to work. 2005-04-20 18:57:47 +00:00
Diego Nehab
6dc9c1096a Seems to be working on windows. 2005-03-11 02:21:27 +00:00
Diego Nehab
e57f9e9964 Apparently, non-blocking connect doesn't work on windows if you use 0
timeout in the select call...
2005-03-11 00:20:21 +00:00
Diego Nehab
8d4e240f6a Forward server working on Mac OS X... 2005-02-08 10:01:01 +00:00
Diego Nehab
05e8f24385 New LTN12 test procedures (still short, but growing)
LTN12 avoids coroutines.
2004-11-28 00:59:12 +00:00
Diego Nehab
7c97e8e40a Almost ready for beta3 2004-11-27 07:58:04 +00:00
Diego Nehab
911e8d7e7f Beta2 is out! Total timeout works on Windows. 2004-07-26 05:17:37 +00:00
Diego Nehab
cd994f306a Gonna try my luck on windows... 2004-07-26 04:03:55 +00:00
Diego Nehab
c8b402e004 Changed send function. 2004-07-18 22:56:14 +00:00
Diego Nehab
e4e2223cff Fixed a bunch of stuff. Added mike's patches. 2004-07-16 06:48:48 +00:00
Diego Nehab
b1a4ad2b19 Compiles and runs on windows. 2004-07-02 18:44:05 +00:00
Diego Nehab
a193c087a4 Fixing send/recv and optimizing. 2004-06-23 01:08:54 +00:00
Diego Nehab
bce1cb30d8 More adjustments/bugfixes. 2004-06-21 06:07:58 +00:00
Diego Nehab
f7579db9e8 Fixing bugs... 2004-06-20 22:19:54 +00:00
Diego Nehab
5ca1049ab4 Fine tuning the "require" business. 2004-05-30 21:36:22 +00:00
Diego Nehab
c98dc99199 Bug feioso no UDP e possivelmente no TCP também. 2004-05-28 07:24:43 +00:00
Diego Nehab
bcc0c2a9f0 New filter scheme.
ltn12 and mime updated.
smtp/ftp broken.
2004-03-16 06:42:53 +00:00
Diego Nehab
390846b640 Added ltn12 module. Modified mime to be stand alone.
Still crashes on invalid input. Dunno why.
2004-02-11 03:31:53 +00:00
Diego Nehab
0b2542d1a6 Worked on the manual.
Implemented stuffing (needs test)
Added cddb and qp examples.
2004-02-04 14:29:11 +00:00
Diego Nehab
0c9f420a35 New accept/connect code.
Better error checking.
Better tests.
__tostring implemented.
2004-01-24 00:18:19 +00:00
Diego Nehab
42e0e74487 Adjusted wsocket to match usocket. Adjusted windows projects. 2004-01-21 20:16:48 +00:00
Diego Nehab
68d57dc931 Corrected connect in windows. Wasn't setting errno... 2004-01-21 01:28:32 +00:00
Diego Nehab
fbb42b80cb Seems to be working on windows and linux. 2004-01-19 16:18:31 +00:00
Diego Nehab
02ef4e7daa Trying to get rid of EINTR problems... 2004-01-17 08:02:04 +00:00
Diego Nehab
076451c753 Tested in windows. Still needs more testing, but progress has been made. 2004-01-17 00:17:46 +00:00
Diego Nehab
89f3ecf782 http.lua updated. still needs proxy support.
code.lua updated. looks neat.
2004-01-16 07:06:31 +00:00