.tlssetdata Method
Function: |
For the currently selected socket (selection is made through sock.num), adds the data passed in the txdata argument to the contents of the TLS TX buffer. The data is then encrypted by the TLS engine. |
Syntax: |
sock.tlssetdata(byref txdata as string) as word |
Returns: |
The actual number of bytes successfully stored into the TLS TX buffer |
See Also: |
Part |
Description |
txdata |
The data to encrypt and send; this data will be added to the contents of the TLS TX buffer. |
Details
If the buffer doesn't have enough space to accommodate all the data being added, this data will be truncated. The newly added data is not sent out immediately. This only happens after the sock.send method is used to commit the data. This allows your application to prepare large amounts of data before sending it out.
This method will return 0 if called on a socket that is not running in the TLS mode (sock.tlscurrentnum <> sock.num).