Closed lilien1010 closed 9 years ago
@lilien1010 This library does cosockets in the timers created by the context of log_by_lua* and etc rather than doing cosockes directly in log_by_lua*. See the ngx.timer.at API.
@lilien1010 If you're reporting a problem in this library, then I must say your error message is incomplete and you didn't show a minimal code and configuration example to demonstrate the problem.
@agentzh Oh I see,I checked your source code, but not carefully, I thought you are using ngx.socket.tcp directly. -------- actually Here is what I am looking for I handle a http request by content_by_lua_file , and I need to send result data to another TCP server, and keep this TCP connection alive , but setkeepalive won't work
@lilien1010 Your last question is already off the topic. Please use the openresty-en mailing list instead. BTW, please read the documentation of setkeepalive
carefully and properly handle any errors returned by setkeepalive()
yourself in Lua before asking questions (because most of the time, it's just simple mistakes on the user's side). Thanks for your cooperation.
@lilien1010 If you are asking about how to use cosocket, this is really off the topic. I'm closing this for now, discussion in openresty-en mailing list is recommended.
I think that the cosock API is not allowed to run in logging request
" log_by_lua(nginx.conf:209):2: in function <log_by_lua(nginx.conf:209):1> while logging request,"