lua-users home
lua-l archive

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

> >
> > 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).
> >
> > Regards,
> > Matthew
> >
> >
> Be warned as well that while UDP packets will be buffered, you can't
> read only part of a buffered packet. If you only read some of the
> packet, the rest gets discarded.
> --
> Sent from my toaster.

Very useful, thanks a lot. Really helps to understand the innerworkings.

So, in a more daunting task than coding itself, I setup my first GitHub
repository with the code. 

It's a Copas addon that works on top of Copas, using the familiar step and
loop functions, except that it adds the capability to run timers at a
specific time or interval of your liking. It includes some code that checks
network connectivity at regular intervals and notifies if there are any
changes. Run the included test to get an idea of what it does.

Please check it out and let me know what you think, comments and suggestions
are welcome.