开发者

How to get Client IP in Lua Sockets

I'm having trouble locating how I g开发者_开发技巧o about getting the ip address of each client as they connect to my server, using LuaSockets; Also: I apologise if this has been answered in another post, but I could find it; Link me if this is the case.

Cheers!


Use conn:getpeername(), it returns host and port of the client.


getpeername should work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜