Qore SmtpClient Module Reference 2.0
Loading...
Searching...
No Matches
SmtpClient::SmtpPingPollOperation Class Reference

Class for SMTP non-blocking / polling pings. More...

#include <SmtpClient.qm.dox.h>

Inheritance diagram for SmtpClient::SmtpPingPollOperation:
[legend]

Public Member Methods

 constructor (SmtpClient smtp)
 Creates the object based on the SmtpClient.
 
*hash< SocketPollInfo > continuePoll ()
 Returns a hash to be used for I/O polling or NOTHING in case the poll operation is complete.
 
string getGoal ()
 Returns the goal. More...
 
string getState ()
 Returns the current state. More...
 
bool goalReached ()
 Returns True when the goal as been reached. More...
 

Public Attributes

const SPS_COMPLETE = "complete"
 Complete state.
 
const SPS_CONNECT = "connect"
 Connect state.
 
const SPS_LOGIN = "login"
 Login state.
 
const SPS_READ_HELLO = "read-hello"
 Read hello state.
 
const SPS_READ_HELLO_REPLY = "read-hello-reply"
 Read hello reply state.
 
const SPS_READ_LOGIN_REPLY = "read-login-reply"
 Read login reply.
 
const SPS_READ_STARTTLS_REPLY = "read-starttls-reply"
 Read STARTTLS reply.
 
const SPS_SEND_HELLO = "send-hello"
 Send hello state.
 
const SPS_STARTTLS = "starttls"
 Send STARTTLS state.
 
const SPS_UPGRADE_TO_TLS = "upgrade-tls"
 Upgrade socket connection to TLS.
 

Private Member Methods

bool getReply (reference< int > rcode, reference< string > rmsg)
 Private reads a reply from the SMTP server. More...
 
Mutex m ()
 Lock for atomicity.
 
Socket sock ()
 The Socket for communication with the server.
 
 startLogin ()
 Starts the polling login state.
 

Private Attributes

bool esmtp = False
 ESMTP flag.
 
bool goal_reached = False
 Goal reached flag.
 
string hello_reply
 Server's HELO / EHLO reply.
 
int hello_reply_code
 Server's HELO / EHLO reply code.
 
hash< auto > info
 Info about the SMTP client.
 
int login_code
 Server's login code.
 
string login_reply
 Server's login reply.
 
AbstractPollOperation poller
 The current internal poll operation.
 
int starttls_code
 Server's STARTTLS code.
 
string starttls_reply
 Server's STARTTLS reply.
 
string state
 Current state.
 

Detailed Description

Class for SMTP non-blocking / polling pings.

Member Function Documentation

◆ getGoal()

string SmtpClient::SmtpPingPollOperation::getGoal ( )
virtual

Returns the goal.

Returns
the goal set in the constructor

Implements Qore::AbstractPollOperation.

◆ getReply()

bool SmtpClient::SmtpPingPollOperation::getReply ( reference< int >  rcode,
reference< string >  rmsg 
)
private

Private reads a reply from the SMTP server.

Returns
False to continue reading, True if done

◆ getState()

string SmtpClient::SmtpPingPollOperation::getState ( )
virtual

Returns the current state.

Returns
the current state

Implements Qore::AbstractPollOperation.

◆ goalReached()

bool SmtpClient::SmtpPingPollOperation::goalReached ( )
virtual

Returns True when the goal as been reached.

Returns
True when the goal as been reached

Implements Qore::AbstractPollOperation.