+# 'sudo tc qdisc add dev lo root netem delay 50ms'
+# You'll need iproute-tc installed, for the tc command.
+# You'll need kernel-modules-extra installed, or you get
+# an unhelpful error from RTNETLINK.
+# To tidy up: 'sudo tc qdisc delete dev lo root'
+#
+# MacOS:
+# The kernel seems to have TFO enabled both ways as default.
+# There is a net.inet.tcp.clear_tfocache parameter
+## sysctl -w foo-val
+#
+# For network delays there is something called 'Network Link Conditioner'
+# which might do the job. But how to manipulate it?
+#
+#
+sudo perl
+system ("tc qdisc add dev lo root netem delay 50ms");
+****
+#
+#
+# Disable the TFO blackhole detection, as we seem to be running foul of it.
+# If bitten, we see the expected EINPROGRESS for sendto, yet no TFO cookie
+# option on the SYN.
+#
+sudo perl
+system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
+****