Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcpsock:receive needs stream reading pattern #32

Open
mike07026 opened this issue Aug 30, 2016 · 4 comments
Open

tcpsock:receive needs stream reading pattern #32

mike07026 opened this issue Aug 30, 2016 · 4 comments

Comments

@mike07026
Copy link

mike07026 commented Aug 30, 2016

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 mike07026 changed the title tcpsock:receive need stream reading pattern tcpsock:receive needs stream reading pattern Aug 30, 2016
@agentzh
Copy link
Member

agentzh commented Aug 30, 2016

@mike07026 Understood and it's been on the TODO list already. And @brg-liuwei is already working on a patch for it. See #33.

@yigangbupt
Copy link

@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?

@shancci
Copy link

shancci commented Mar 15, 2019

BSD-style receiveany() was introduced in lua-nginx-module v0.10.14, but not ported to this repo.

@splitice
Copy link

splitice commented Jun 8, 2019

@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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants