.targetip Property


For active opens on the currently selected socket (selection is made through sock.num) specifies the target IP to which the socket will attempt to connect to. For passive opens specifies, in certain cases, the only IP address from which an incoming connection will be accepted.



Value Range:

Any valid IP address (i.e. ""). Default = ""

See Also:

sock.targetport, sock.remoteport


For active opens, this property is only relevant at the moment of connection establishment.

For incoming connections, whether this property will matter or not is defined by the sock.inconmode property. When the sock.inconmode = 1 — PL_SOCK_INCONMODE_SPECIFIC_IPPORT or 2 — PL_SOCK_INCONMODE_SPECIFIC_IP_ANY_PORT, only the host with IP matching the one set in the sock.targetip property will be able to connect to the socket.

Current IP on the "other side" of the connection can always be checked through the sock.remoteip read-only property.