.targetip Property


For active opens on the currently selected socket (selection is made through sock.num), specifies the target IP address to which the socket will attempt to connect. 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 (e.g., ""). 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 sock.inconmode = 1 — PL_SOCK_INCONMODE_SPECIFIC_IPPORT or 2 — PL_SOCK_INCONMODE_SPECIFIC_IP_ANY_PORT, only the host with the IP address matching the one set in the sock.targetip property will be able to connect to the socket.

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

.targetip Property