openresty / lua-resty-websocket

WebSocket support for the ngx_lua module (and OpenResty)
508 stars 106 forks source link

support socket connection pool and fix repeated sslhandshake #80

Closed chenyyyang closed 1 year ago

chenyyyang commented 1 year ago
  1. Add pool_size(optional) and backlog(optional) to the opts parameter to support opening the connection pool. If omitted and no backlog option was provided, no pool will be created.
  2. If the reused time of the connection exceeds 0, it means that sslhandshake has been performed.there is no need to repeat sslhandshake.
chenyyyang commented 1 year ago

t/count.t ... Can't locate Test/Nginx/Socket/Lua.pm in @INC (you may need to install the Test::Nginx::Socket::Lua module) (@INC contains: /home/travis/build/openresty/lua-resty-websocket /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/site_perl/5.28.2/x86_64-linux-thread-multi /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/site_perl/5.28.2 /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/5.28.2/x86_64-linux-thread-multi /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/5.28.2) at t/count.t line 3. BEGIN failed--compilation aborted at t/count.t line 3. t/count.t ... Dubious, test returned 2 (wstat 512, 0x200) No subtests run t/cs.t ...... Can't locate Test/Nginx/Socket/Lua.pm in @INC (you may need to install the Test::Nginx::Socket::Lua module) (@INC contains: /home/travis/build/openresty/lua-resty-websocket /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/site_perl/5.28.2/x86_64-linux-thread-multi /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/site_perl/5.28.2 /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/5.28.2/x86_64-linux-thread-multi /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/5.28.2) at t/cs.t line 3. BEGIN failed--compilation aborted at t/cs.t line 3. t/cs.t ...... Dubious, test returned 2 (wstat 512, 0x200) No subtests run t/sanity.t .. Can't locate Test/Nginx/Socket/Lua.pm in @INC (you may need to install the Test::Nginx::Socket::Lua module) (@INC contains: /home/travis/build/openresty/lua-resty-websocket /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/site_perl/5.28.2/x86_64-linux-thread-multi /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/site_perl/5.28.2 /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/5.28.2/x86_64-linux-thread-multi /home/travis/perl5/perlbrew/perls/5.28.2-extras/lib/5.28.2) at t/sanity.t line 3. BEGIN failed--compilation aborted at t/sanity.t line 3. t/sanity.t .. Dubious, test returned 2 (wstat 512, 0x200)