-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: support tcp binding ip:port or ip of ipv4 or ipv6 #2381
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
base: master
Are you sure you want to change the base?
Conversation
Because, as a TCP client, the port will be assigned by the Linux kernel; |
@@ -3430,7 +3430,7 @@ ngx_http_lua_socket_tcp_handler(ngx_event_t *ev) | |||
static ngx_int_t | |||
ngx_http_lua_socket_tcp_get_peer(ngx_peer_connection_t *pc, void *data) | |||
{ | |||
/* empty */ | |||
pc->type = SOCK_STREAM; |
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.
SOCK_STREAM is by Default
This pull request is now in conflict :( |
|
||
len -= plen + 1; | ||
|
||
addr = ngx_http_lua_parse_addr(L, text, len); |
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.
Repeated parsing of addr from above
Just have a discussion: |
bugfix: make it possible to bind ip:port or ip from support only binding ip.