-
Notifications
You must be signed in to change notification settings - Fork 198
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
Comments
@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. |
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
The text was updated successfully, but these errors were encountered: