This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

TCP over SSL
#7
Hi Admin,

A couple of questions,

Will this server support multiple clients? I added a basic authentication, that just sets a global variable on connecting and closes the connection if the password is incorrect.

The data received is passed another function parseC. Now I need to be able to respond back to the connected client where I declared a global function in this handler. Is this the right way to do this?
Code:
-- handle data frame       if data then        if(first==true)then           if(data ~='mypassword')then             first=false             sock:close()           end         end         Sclient= function (param)           sock:send(param)         end         local fd,prtd = pcall(parseC,data)                     if(fd==false)then                         alert("[elk-client] Error with parsemsg %s ",prtd)                     end       end

Thanks,


Roger
Reply


Messages In This Thread
TCP over SSL - by oyvindi - 31.10.2016, 15:56
RE: TCP over SSL - by admin - 01.11.2016, 09:30
RE: TCP over SSL - by oyvindi - 01.11.2016, 09:44
RE: TCP over SSL - by rocfusion - 16.10.2017, 07:47
RE: TCP over SSL - by admin - 16.10.2017, 11:52
RE: TCP over SSL - by rocfusion - 18.10.2017, 04:43
RE: TCP over SSL - by rocfusion - 19.10.2017, 09:03
RE: TCP over SSL - by admin - 19.10.2017, 09:19

Forum Jump: