TrustCore SDK NanoSSL API reference  version 7.0
Asynchronous Client Callbacks

Customizable asynchronous NanoSSL client callbacks. More...

Variables

sbyte4(* sslSettings::funcPtrClientOpenStateUpcall )(sbyte4 connectionInstance, sbyte4 isRehandshake)
 Indicate that a secure asynchronous session has been established between peers. More...
 
void(* sslSettings::funcPtrClientReceiveUpcall )(sbyte4 connectionInstance, ubyte *pMesg, ubyte4 mesgLen)
 Retrieve data received from a server. More...
 
void(* sslSettings::funcPtrClientStartTimer )(sbyte4 connectionInstance, ubyte4 msTimerExpire, sbyte4 future)
 Start a timer for timeout notifications. More...
 

Detailed Description

Variable Documentation

◆ funcPtrClientOpenStateUpcall

sbyte4(* sslSettings::funcPtrClientOpenStateUpcall) (sbyte4 connectionInstance, sbyte4 isRehandshake)

This callback indicates that a secure asynchronous session has been (re)established between peers (client and server). This function is called when an SSL-rehandshake has completed.

Note
Your application should not attempt to send data through the given connection context until the successful session establishment indicated by this upcall is achieved.
Since
1.41
Version
1.41 and later

To enable this callback, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
Parameters
connectionInstanceConnection instance returned from SSL_ASYNC_connect().
isRehandshakeTrue(One) indicates a rehandshake notice.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

ssl.h

◆ funcPtrClientReceiveUpcall

void(* sslSettings::funcPtrClientReceiveUpcall) (sbyte4 connectionInstance, ubyte *pMesg, ubyte4 mesgLen)

This callback retrieves data received from a server through the given connection context. The data is returned through the pMesg parameter as decrypted text.

Since
1.41
Version
1.41 and later

To enable this callback, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
Parameters
connectionInstanceConnection instance returned from SSL_ASYNC_connect().
pMesgPointer to the received decrypted message.
mesgLenNumber of bytes in the received message (pMesg).
Returns
None.

ssl.h

◆ funcPtrClientStartTimer

void(* sslSettings::funcPtrClientStartTimer) (sbyte4 connectionInstance, ubyte4 msTimerExpire, sbyte4 future)

This callback starts a timer for timeout notifications.

Since
1.41
Version
1.41 and later

To enable this callback, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
Parameters
connectionInstanceConnection instance returned from SSL_ASYNC_connect().
msTimerExpireNumber of milliseconds until timer expires.
future(Reserved for future use.)
Returns
None.

ssl.h