TLS sockets require packet as a string