.reconmode Property

Function:

For the currently selected socket (selection is made through sock.num), determines whether the socket accepts reconnects and, if yes, from which sources.

Type:

Enum (pl_sock_reconmode, byte)

Value Range:

  • 0 — PL_SOCK_RECONMODE_0 (default):
    • UDP: Reconnects accepted only from the same IP as the one already engaged in the current connection with this socket, but any port; port switchover will not happen.
    • TCP: Reconnects are not accepted at all.
  • 1 — PL_SOCK_RECONMODE_1:
    • UDP: Reconnects accepted from any IP, any port; port switchover will not happen.
    • TCP: reconnects accepted only from the same IP and port as the ones already engaged in the current connection with this socket.
  • 2 — PL_SOCK_RECONMODE_2:
    • UDP: Reconnects accepted only from the same IP as the one already engaged in the current connection with this socket, but any port; port switchover will happen.
    • TCP: Reconnects accepted only from the same IP as the one already engaged in the current connection with this socket, but any port.
  • 3 — PL_SOCK_RECONMODE_3:
    • UDP: Reconnects accepted from any IP, any port; port switchover will happen.
    • TCP: Reconnects accepted from any IP, any port.

See Also:

---


Details

A reconnect situation is when a passive open and resulting connection replace, for the same socket, the connection that was already in progress. For UDP, this property additionally defines whether a "port switchover" will occur as a result of an incoming connection (passive open) or a reconnect. Port switchover is when the socket starts sending its outgoing UDP datagrams to the port from which the most recent UDP datagram was received, rather than the port specified by the sock.targetport property.

A warning note icon.DO NOT enable reconnects on sockets that are used to handle HTML requests. This will interfere with HTML operation, as explained in Understanding TCP Reconnects.


.reconmode Property

Details