[botan-devel] TLS channel on active callback.

Jack Lloyd lloyd at randombit.net
Sun Jan 4 11:19:04 EST 2015

When a handshake is completed the handshake completion callback will
be called. Assuming this function returns without throwing the session
will become activated and application records can fly.

The handshake callback only provides a reference to the new session
but you can use std::bind so the callback also receives the relevant
Channel or anything else you need to know that the session exists.

An alternative would be to check if is_active() returns false and if
so queueing the application data and sending it after the handshake
completes. However you cannot send application records from the
handshake callback (is_active does not become true until after
the session callback returns).


On Sun, Jan 04, 2015 at 03:58:19PM +0000, Erik Johnston wrote:
> Is there currently a way to get a callback when the TLS connection has
> become active? I'm trying to write a simple app that will make a HTTPS
> request, however I'm completely failing to see when I can start safely
> sending the HTTP request bytes?
> Thanks,
> Erik.

> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://lists.randombit.net/mailman/listinfo/botan-devel

More information about the botan-devel mailing list