tcpsock:receive needs stream reading pattern
Now tcpsock:receive now support two pattern '_a' and '_l'(default '*l' if pattern is nil), it's quite useful in text-based protocol or open binary protocol(eg. Mysql).
But to deal with non-public protocol, we need stream reading pattern, return anything once socket receives.
For example, we hava a decode library(.so/.dll) privided by others who don't open their protocol, and we need to fill socket data into the library to decode message out. Without steam reading pattern, decode can't be done in efficient way (done by tcpsock:receive(1) loop).
I suggest to add stream reading pattern into tcpsock:receive, especially in stream-lua-nginx-module
@mike07026 Understood and it's been on the TODO list already. And @brg-liuwei is already working on a patch for it. See #33.
@mike07026 Understood and it's been on the TODO list already. And @brg-liuwei is already working on a patch for it. See #33.
sorry, is the patch in effect? Why didn't I find in v0.0.6rc3 version?
BSD-style receiveany() was introduced in lua-nginx-module v0.10.14, but not ported to this repo.
@shancci Indeed. Just found this out myself. Unfortunately this isnt really covered by the documentation.
@agentzh Is there a specific reason that this function has not been ported (I mean other than time / priorities)?