remove duplicated definitions of tls_read and tls_write