Socket.ip readonly property



The Socket.ip property gets the IP address the socket is bound to as a string

Example

local net = require "net" -- create and connect a client TCP socket to the host "google.com" local socket = net.Socket("google.com", 80) -- outputs socket.ip print("socket.ip = "..socket.ip)