Under the SSLSocket documentation:
Calling Read, ReadAll, or Lookahead may not fetch all of the data in the internal buffer. This is because SSL needs to read data in blocks (due to the cryptography), and it may not have a complete block in the buffer. For example, there may be 700 bytes available in the buffer, but SSL can only decrypt 512 bytes due to the remainder being an incomplete block. What occurs in this case is some data may remain stagnant in the buffer. When more data comes in, the DataAvailable event handler is called. If there are no more DataAvailable events, then upon disconnection, additional DataAvailable event will be issued to let you pick up any stagnant data that SSL can give us back.
Is this still relevant in the current version socket? I was extremely nervous going SSLSocket in my applications because of this, but have since tested it with various amounts of information sent via the remote .write method… and the local dataAvailable (w/ readAll) seems to ALWAYS write what is transmitted. I’ve tried small writes (5-6 bytes) and larger writes (700-2000 bytes) and they’ve all came in perfect. I know that under the TCP protocol, you’re not guaranteed a complete packet on transmission… so I’m making a handler to verify that I, indeed, got a complete ‘message’ before processing it. I just want to make sure if this is now something that is handled internally somehow, or if it’s something I need to watch for and handle myself. Thanks…