lua-users home
lua-l archive

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

On Mon, Sep 26, 2011 at 2:28 PM, Thijs Schreijer
<> wrote:
> 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?

For TCP, yes. If the receiver is not picking up data fast enough, the
line stalls all the way to the sender as far as I have ever observed
these things. I don't think being a slow communication party is a
problem at all in TCP. Which is all your scenario boils down to,
right? The other side doesn't know WHY you're slow, whether it's
because of calculations or network or anything else.

I mean, TCP works with modems and C64 web servers (is that one still
online?). It is really very flexible in terms of differing speeds.

Not paying attention to a socket for a while is totally fine, it will
just sit there until you tend to it again.

I have that sockets and coroutine stuff almost completely figured out
in Lua OS now btw... the only thing the system still lacks now is a
smart prioritizing of calculation and socket I/O. It is more or less a
matter of choice - what should be done first if both areas have a
backlog? Communicate first - or calculate first?