add conversion of buffer to string befor tls encryption in Socket.write