Socket.port readonly



The Socket.port property gets the port number used to create the Socket.

Example

--! luart-extensions import net -- create and connect a client TCP socket to the host "google.com" local socket = net.Socket("google.com", 80) -- outputs 80 print("port = "..socket.port)