[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: more questions on co-routines and luasocket
- From: Matthew Wild <mwild1@...>
- Date: Mon, 26 Sep 2011 17:16:58 +0100
On 26 September 2011 15:28, Thijs Schreijer <firstname.lastname@example.org> 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:
If the buffer is full when a packet arrives that packet will typically
just be discarded (with UDP).