-
Notifications
You must be signed in to change notification settings - Fork 2.1k
implement tcpsock:getreusedtimes to get tcp infos #1460
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
Conversation
|
@jichengwang It would be better to add some tests :) |
| } | ||
|
|
||
| static int | ||
| ngx_http_lua_socket_tcp_info(lua_State *L) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we just need to expose a Lua API to return the connection fd. Such information gathering features are usually platform-specific (we're not just supporting Linux or *NIX systems) and are better off to some 3rd-party Lua libraries distributed to opm (or if it's indeed good enough and popular enough, we can bundle it in OpenResty by default too). It does not have to be in the core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is this PR: #1147 to do that - it would be handy to have one or the other.
|
This pull request is now in conflict :( |
f924579 to
fef2581
Compare
|
This pull request is now in conflict :( |
|
This pull request is now in conflict :( |
|
This pull request is now in conflict :( |
|
This pull request is now in conflict :( |
implement tcpsock:getreusedtimes to get tcp infos