kernelsauce / turbo

Turbo is a framework built for LuaJIT 2 to simplify the task of building fast and scalable network applications. It uses a event-driven, non-blocking, no thread design to deliver excellent performance and minimal footprint to high-load applications while also providing excellent support for embedded uses.
http://turbo.readthedocs.io/
Apache License 2.0
528 stars 84 forks source link

IOStream:write issue #179

Closed shadylabs closed 9 years ago

shadylabs commented 9 years ago

Hi, I have this problem with IOStream:write (data, callback, arg). According to documentation the callback is called after write is over so i would like to use it to close the stream after writing to it once. After some experiments it looks like the callback /or closing function/ was executed before even writing begins. Then i decided to check the stream if it is writing and instead of true or false i received nil. This was checked again with the "Parrot" example too. This thingy here: function iostream.IOStream:writing() return self._write_buffer_size ~= 0 or self._const_write_buffer end for some reason returns nil. Any suggestions will be highly appreciated Plamen.

kernelsauce commented 9 years ago

You resolved this @shadylabs ?

shadylabs commented 9 years ago

yeah. its probably my mistake, just replaced some functions and it works properly know. Working on the code more than 10 hours a day results in lots off errors , sorry about that.