Skip to main content

Name

esmtp_message_factory — This function is the ESMTP server state machine

Synopsis

#include "esmtp_factory.h"

| int **esmtp_message_factory** ( | event, |   | |   | eventtype, |   | |   | vclosure, |   | |   | now); |   |

Event * <var class="pdparam">event</var>; int <var class="pdparam">eventtype</var>; void * <var class="pdparam">vclosure</var>; struct timeval * <var class="pdparam">now</var>;

Description

This function is the ESMTP server state machine.

Warning

This function should only be used under direct guidance from Message Systems professional services.

Parameters

event

The Event. For more information about this data type see Event.

eventtype

Event types are defined in event.h as follows:

#define E_READ         0x00000001
#define E_WRITE        0x00000002
#define E_EXCEPTION    0x00000004
#define E_TIMEOUT      0x00000008
#define E_ASYNC        0x00000010

E_READ is defined to indicate that reading the descriptor will not block, E_WRITE to indicate that writing will not block and E_EXCEPTION to indicate certain error conditions. There are other possible mask values, but they are for internal use. eventtype can be set to one or more of these values bitwise OR'd together.

closure

A pointer to the closure function.

now

The current time.

Return Values

On error, this function returns 0.

Threading

It is legal to call this function in the Scheduler thread.

See Also

Was this page helpful?