PlocalPort
Bun

property

net.Socket.localPort

readonly localPort?: number

The numeric representation of the local port. For example, 80 or 21.