Mock up a plain or TLS-encrypted TCP connection without using any actual network facilities or needing any permissions. This is useful for testing, particularly playing around with different TLS failure modes.