lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 26 September 2011 15:28, Thijs Schreijer <> wrote:

> Is this going to be solid? I used some code from and old post to make
> copas handle UDP sockets. Now what will luasocket do when data comes in
> while copas isn’t listening? (obviously the intermezzo is going to be as
> short as possible, but still...). Will luasocket buffer the data? And for
> UDP? I haven’t seen a possibility to set a buffersize somewhere in
> luasocket, so when will that run out?

The OS will buffer the data. How much data is dependent on the OS, and
its configuration. On Linux you can see the default buffer size with:
cat /proc/sys/net/ipv4/udp_rmem_min

If the buffer is full when a packet arrives that packet will typically
just be discarded (with UDP).