SSL_read preserving message boundaries.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It appears that SSL_read does not work like a stream protocol.

This is the server part of the program --

char c[] = "Hello";
SSL_write (sslconnection, &c[0], 1);
SSL_write (sslconnection, &c[1], 1);
SSL_write (sslconnection, &c[2], 1);
SSL_write (sslconnection, &c[3], 1);
SSL_write (sslconnection, &c[4], 1);
SSL_write (sslconnection, &c[5], 1);

And this's the client part --

char c[15];
sleep(2);
SSL_read (sslconnection, c, sizeof(c));
printf ("%s\n", c);

With the TCP implementation, I get a complete 'Hello', with SSL_read, 
I'm only getting 'H', under the next call I get 'e', then the next gives 
'l' etc...

So this is preserving message boundaries. How do I get the complete 
message just like with TCP?


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux