The Route property determines whether the socket can use the
operating system's normal network routing mechanisms when sending
data. The default value is True, which allows packets to be delivered
to both local and remote hosts using the system's configured network
routes.
Setting this property to False enables the SO_DONTROUTE
socket option, which instructs the operating system to bypass gateways
and send packets only to destinations that are directly reachable
through a local network interface. Packets destined for hosts on
remote networks that require a gateway or router will generally fail
to be sent, even if those hosts would otherwise be reachable through
the normal network configuration.
This property is primarily intended for specialized networking
applications, such as network diagnostics, testing local network
connectivity, or applications that specifically require communication
with hosts on a directly connected network. It does not select a
particular network interface, and it should not be used as a security
mechanism to prevent network traffic from leaving the local network.
For most applications, this property should remain set to True.
Setting it to False can prevent connections to remote servers and
interfere with normal network communication, particularly on systems
with multiple network interfaces or complex routing configurations.