.tlssetdata Method


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.


sock.tlssetdata(byref txdata as string) as word


The actual number of bytes successfully stored into the TLS TX buffer

See Also:

Transport Layer Security (TLS), Sending and Receiving Data




The data to encrypt and send; this data will be added to the contents of the TLS TX buffer.


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).