use SSL_peek for sock_gets