Unit tests for TCP (ssl and non-ssl)