1

I'm having trouble locating how I go 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!

Shane Gadsby
  • 1,260
  • 1
  • 13
  • 19

2 Answers2

2

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

Alexander Gladysh
  • 39,865
  • 32
  • 103
  • 160
1

getpeername should work.

Nicolas Modrzyk
  • 13,961
  • 2
  • 36
  • 40