There's an api for raw socket:

```
int sz;
ioctlsocket(sock, FIONREAD, &sz); 
::recv(sock, buff, sz, 0);

```

the **ioctlsocket** can be used to get the incoming buffer size, but how to get it with openssl:

```
int sz = what?
SSL_read(pSSL, buff, sz);

```