SMTPResponse Class Reference

A SMTP response, as sent by the server. More...

Inheritance diagram for SMTPResponse:
Inheritance graph
[legend]
Collaboration diagram for SMTPResponse:
Collaboration graph
[legend]

List of all members.

Classes

class  responseLine
 An element of a SMTP response. More...

Public Member Functions

int getCode () const
const string getText () const
const responseLine getLineAt (const unsigned int pos) const
unsigned int getLineCount () const
const responseLine getLastLine () const

Static Public Member Functions

static ref< SMTPResponsereadResponse (ref< socket > sok, ref< timeoutHandler > toh)

Detailed Description

A SMTP response, as sent by the server.


Member Function Documentation

int getCode (  )  const

Return the SMTP response code.

Returns:
response code
const SMTPResponse::responseLine getLastLine (  )  const

Return the last line in the response.

Returns:
last response line
const SMTPResponse::responseLine getLineAt ( const unsigned int  pos  )  const

Return the response line at the specified position.

Parameters:
pos line index
Returns:
line at the specified index
unsigned int getLineCount (  )  const

Return the number of lines in the response.

Returns:
number of lines in the response
const string getText (  )  const

Return the SMTP response text.

The text of each line is concatenated.

Returns:
response text
ref< SMTPResponse > readResponse ( ref< socket sok,
ref< timeoutHandler toh 
) [static]

Receive and parse a new SMTP response from the specified socket.

Parameters:
sok socket from which to read
toh time-out handler
Returns:
SMTP response
Exceptions:
exceptions::operation_timed_out if no data has been received within the granted time

The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2