> Hi, > > Once again I try to explain my problem. I am having a client sending > "unknown size of data" to server. Server doesn't know how much to > receive, but the length of the data is embedded inside the data itself ( > initial 32 bytes contains this info ). So server has to read the initial > bytes of data, determine the length of complete payload and then read > the complete data. So the question is how do I do it ? For implementing > this I need a recursive call to ssl_read which I am not able to .. The > code snippet I attached was trying to read 32 bytes recursively and > print it on console. It indeed reads 32 bytes but only once and wait > infinitely after that ..
1: read the 32 byte "packet header" 2: read the dynamic size part 3: goto 1 The reason it would wait for ever is that you don't feed it with new 32 bytes from the other side. You try to read 32 and 32 bytes forever over and over again. Stian ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]