<feed xmlns='http://www.w3.org/2005/Atom'>
<title>luasocket/docs/tcp.html, branch copilot/update-urltest-helper</title>
<subtitle>A mirror of https://github.com/lunarmodules/luasocket.git
</subtitle>
<id>https://git.lua4.win/luasocket/atom?h=copilot%2Fupdate-urltest-helper</id>
<link rel='self' href='https://git.lua4.win/luasocket/atom?h=copilot%2Fupdate-urltest-helper'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/luasocket/'/>
<updated>2026-08-31T07:57:58+00:00</updated>
<entry>
<title>Merge pull request #463 from lunarmodules/feat/receive-limit</title>
<updated>2026-08-31T07:57:58+00:00</updated>
<author>
<name>Caleb Maclennan</name>
<email>caleb@alerque.com</email>
</author>
<published>2026-08-31T07:57:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/luasocket/commit/?id=8f18ce95bb38c7f5c4bef5b3684cf1b0df1fc266'/>
<id>urn:sha1:8f18ce95bb38c7f5c4bef5b3684cf1b0df1fc266</id>
<content type='text'>
feat(receive): add maxsize argument to bound memory usage</content>
</entry>
<entry>
<title>chore(docs): add docs for SO_EXCLUSIVEADDRUSE and others</title>
<updated>2026-08-31T07:52:00+00:00</updated>
<author>
<name>Thijs Schreijer</name>
<email>thijs@thijsschreijer.nl</email>
</author>
<published>2026-08-30T13:58:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/luasocket/commit/?id=a9a1e25fdec1faba0237a554027a0f717f132c51'/>
<id>urn:sha1:a9a1e25fdec1faba0237a554027a0f717f132c51</id>
<content type='text'>
Adds docs for the option, but also adds the docs for other
options present in the code but missing from the docs.
</content>
</entry>
<entry>
<title>chore(docs): some cleanup</title>
<updated>2026-08-17T05:39:55+00:00</updated>
<author>
<name>Thijs Schreijer</name>
<email>thijs@thijsschreijer.nl</email>
</author>
<published>2026-08-17T05:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/luasocket/commit/?id=e912d157b242e661dca37d0a8269202dda974ba7'/>
<id>urn:sha1:e912d157b242e661dca37d0a8269202dda974ba7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat(receive): add maxsize argument to bound memory usage</title>
<updated>2026-07-30T20:06:04+00:00</updated>
<author>
<name>Thijs Schreijer</name>
<email>thijs@thijsschreijer.nl</email>
</author>
<published>2026-07-30T17:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/luasocket/commit/?id=73b0780321acb14bab6707006f5136ea9998951d'/>
<id>urn:sha1:73b0780321acb14bab6707006f5136ea9998951d</id>
<content type='text'>
client:receive("*l") and receive("*a") are unbounded: a peer that never
sends a newline, or never closes, makes LuaSocket buffer until the
process runs out of memory (e.g. src/http.lua reading response headers
in a loop). Add an optional maxsize argument that caps the payload a
single call may accumulate, including prefix.

- Hoist all argument validation ahead of timeout_markstart() so bad
  calls (maxsize &lt; 1, #prefix &gt;= maxsize, numeric pattern &gt; maxsize)
  raise before any I/O and leave the socket untouched.
- recvline/recvall take a budget and return a new internal
  BUF_OVERSIZED code, surfaced to Lua as the "oversized" error
  alongside "timeout"/"closed", with the partial held in the 3rd
  return value.
- recvraw is left untouched: argument checks make the cap unreachable
  for numeric patterns.
- Preserve three invariants: a timeout partial is always shorter than
  maxsize (safe to retry as prefix), completion beats the cap for *a,
  and no bytes are lost or skipped on overflow.
- tcp.c, unixstream.c and serial.c all share this code path unchanged.

Adds test coverage (argument errors, *l/*a boundaries, timeout/close
at the cap, the drain idiom, numeric patterns, unix-stream mirror) and
documents the new argument, error, and recovery idioms in docs/tcp.html.
</content>
</entry>
<entry>
<title>feat(tcp): Add support for TCP Defer Accept</title>
<updated>2022-07-27T06:40:18+00:00</updated>
<author>
<name>Kim Alvefur</name>
<email>zash@zash.se</email>
</author>
<published>2022-07-27T06:40:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/luasocket/commit/?id=d1ad8160cba9e504c9d17665492044a93efdc3ab'/>
<id>urn:sha1:d1ad8160cba9e504c9d17665492044a93efdc3ab</id>
<content type='text'>
This makes it so that a listening socket does not become readable for
accept() until a connection has been fully established *and* started
sending something, thus the program doesn't have to wait for the first
data. This only makes sense for client-speaks-first protocols.

Co-authored-by: Caleb Maclennan &lt;caleb@alerque.com&gt;</content>
</entry>
<entry>
<title>feat(tcp): Add support for TCP Fast Open</title>
<updated>2022-07-27T06:16:43+00:00</updated>
<author>
<name>Kim Alvefur</name>
<email>zash@zash.se</email>
</author>
<published>2022-07-27T06:16:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/luasocket/commit/?id=0c7df119c2b71bed814db7b3da8fc379131433fe'/>
<id>urn:sha1:0c7df119c2b71bed814db7b3da8fc379131433fe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move doc→docs so we can serve it with GitHub Pages</title>
<updated>2022-03-22T21:11:24+00:00</updated>
<author>
<name>Caleb Maclennan</name>
<email>caleb@alerque.com</email>
</author>
<published>2022-03-22T21:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/luasocket/commit/?id=f98977b2dac48fc66822402b095336e683715126'/>
<id>urn:sha1:f98977b2dac48fc66822402b095336e683715126</id>
<content type='text'>
</content>
</entry>
</feed>
