lua-users home
lua-l archive

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


On Tue, Oct 11, 2011 at 4:25 PM, Dean Sellers <dean.sellers@rinstrum.com> wrote:
> I did notice the partial result return, but like HyperHacker, I couldn't
> make it work reliably. Sometimes I would get no partial result?

Never seen that, but I remain interested to know if somebody can show
me a reproduction.

> As you point out though for this protocol byte by byte makes sense, in
> fact this protocol was originally designed as a serial line one. That is
> probably why it seems similar.

What's the protocol?

> One of my jobs (in the near future) is to add serial support to the lua
> API I am writing, so if you are willing to share I would love to see
> your implementation :-)

https://github.com/sam-github/luasocket

specifically:

https://github.com/sam-github/luasocket/commit/ed892af39ee334bcd732a8ca9dd8cad267fc15aa

Code is based off unix.c, too bad there isn't a better way to avoid
the code duplication, but
I don't want to disturb the luasocket code base too much, I still have
hopes Diego will merge at least the obvious
bug fixes, if not the features.

Using a serial device also requires setting its modes, for that I have
bindings to termios, that I should be able
to put up on github, too. Of course, you can always set those with stty.

Cheers,
Sam