Commit Graph

8 Commits

Author SHA1 Message Date
Tamás Bálint Misius
91a9973bfd
Refactor HTTP
Request ownership is no longer flaky. Requests are now owned by the code that makes requests, and Requests and the RequestManager co-own RequestHandles. RequestManager disowns a RequestHandle if it's done with it or if Request code reports that it's no longer needed.

All libcurl code has been moved to RequestManager. This is nice because once NOHTTP is removed, we can add any number of RequestManager implementations, for example one for Android.

Client outliving RequestManager is still a problem, this will have to be addressed later.
2023-01-27 09:26:40 +01:00
Tamás Bálint Misius
a3fe59a2c8
Silence a few libcurl warnings
About CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS being deprecated in 7.85.0.
2022-12-25 11:16:54 +01:00
Tamás Bálint Misius
36d034dc2e
Fix 8-bit-uncleanliness of most of the Lua API
This fixes bugs like "type\0hello mom" being a property name sim.partProperty accepts and half-fixes bugs like text formatting codes making gfx.drawText exit prematurely.
2022-08-22 19:42:51 +02:00
Tamás Bálint Misius
286d0d60b9
Fix mingw-on-linux builds 2021-12-24 22:47:57 +01:00
Tamás Bálint Misius
72948978fa
Fix over-eager MSVCRT bounds checking crash in LuaTCPSocket
MSVCRT doesn't like .operator[](.size()), it's safer to just replace all &.operator[x] with &.operator[0]+x.
2021-06-24 07:10:02 +02:00
Tamás Bálint Misius
fb514ca9e3
Return index into range passed to :send rather than bytes written
This is what LuaSocket used to do.
2021-06-22 20:57:17 +02:00
Tamás Bálint Misius
7cfc5aa9f6
Actually store the return value of curl_easy_send, oops 2021-06-03 21:25:28 +02:00
Tamás Bálint Misius
ed29794fb8
Remove LuaSocket, add new socket API backed by libcurl 2021-05-27 15:13:43 +02:00