FunctionPrototypes:ttSmtpAsyncCbFuncPtr

Jump to: navigation, search

Table of Contents >> Optional Protocols >> SMTP


void ttSmtpAsyncCbFuncPtr (
ttSmtpClientHandle smtpClientHandle,
void TM_FAR * userPtr,
int event
);


Function Description

This user-defined function is called by the stack when an SMTP asynchronous event (e.g. socket event) occurs. Register your callback with an SMTP session handle by calling tfSmtpUserSetAsyncCB(). Use this callback to alert your non-blocking SMTP client code that tfSmtpUserExecute() needs to be called.

Warning Warning: The SMTP asynchronous event callback can occur in the receive task or timer task (or possibly others). You must not call any SMTP API functions from this user callback function, unless the function explicitly allows it. Doing so is not supported and will produce unpredictable results. You should also avoid any calls that could block the calling context, as this could degrade performance of the entire Treck stack.


Parameters

  • smtpClientHandle
    The SMTP client session handle used in the tfSmtpUserSetAsyncCB() call.
  • userPtr
    The user-defined pointer as set by tfSmtpUserSetPointer().
  • event
    Currently unused. Reserved for future expansion.


Table of Contents >> Optional Protocols >> SMTP