File 'net/pop3/pop3s.cls' (part of 'Pool_Net')

Description (short)
Base management of POP3 connections, synchronous operations
Written by
Andreas Kupries
Description
Base management of POP3 connections, synchronous operations
See also
POP3 background information
Keywords
POP3, management of POP3 connections, synchronous operations

Class 'pop3SynConnection'

Options
maxtries
retrydelay
host
timeout
progress
blocksize
user
secret
use-top-for-retr
Methods
public
ClearSocket ()
Close ()
Dele (msgId)
Done (seq)
LoginApop ()
LoginUser ()
Open ()
Retr (msgId)
SetGreeting (g)
SetN (num)
SetSock (s)
Top (msgId)
errorInfo ()
pop3SynConnection ()
state ()
~pop3SynConnection ()
Membervariables
public
sock
state
error
greeting
n
backsignal

Options

-maxtries
Specifies the maximum allowed number of trials to connect. Defaults to 1.
default value: 1
-retrydelay
Specifies the time to wait (in milliseconds) after a failure before doing the next try. Defaults to 10 seconds.
default value: 10000
-host
Specifies the host the demon to connect to resides on. Defaults to 'localhost'.
default value: localhost
-timeout
defines the number of milliseconds to wait before aborting a smtp command without having a response.
-progress
If not empty, a command to evaluate with current connection and number of bytes transfered so far as arguments.
-blocksize
Companion option to progress, optional. Defines the size of the blocks to transfer between invocations of progress. Ignored if progress is empty.
default value: 1024
-user
The name of the user trying to login.
-secret
The password of the user trying to login.
-use-top-for-retr
A boolean flag. Setting it to TRUE causes the sequencer to use the command 'TOP x 0' instead of 'RETR x' to retrieve the message. The first pop server of my provider didn't recognize RETR, but this special command. Maybe some other people have to deal with such a weird beast too.
default value: 0

Methods

ClearSocket ()

Closes the connection to the pop3 server described by this object.

Close ()

Close connection to the pop3 demon described by this object.

Dele (msgId)

Delete the specified message.
Argument: msgId The numerical index of the message to delete.

Done (seq)

This method is called after an operation ends.
Argument: seq The handle of the internal sequencer which executed the completed operation.

LoginApop ()

Logs into the pop3 server described by this object using given username and password. The password is not transfered to the server. A hashcode constructed from it and the server greeting (the timestamp in it) is used instead.

LoginUser ()

Logs into the pop3 server described by this object using given username and password. The password is send in the clear.

Open ()

Opens a connection to the pop3 demon described by this object.

Retr (msgId)

Retrieve the specified message.
Argument: msgId The numerical index of the requested message.

SetGreeting (g)

Accessor method, used by the pop3ApopSeq / pop3UserSeq sequencer to transfer the received greeting into the connection manager (this object).
Argument: g The text of the received greeting.

SetN (num)

Accessor method, used by the pop3ApopSeq / pop3UserSeq to transfer the number of found messages into the connection manager.
Argument: num The number of found messages (as given by STAT).

SetSock (s)

Accessor method, used by the pop3OpenSeq sequencer to transfer information about the channel representing the connection to the pop server.
Argument: s The handle of the channel representing the connection to the pop server.

Top (msgId)

Read header information of the specified message.
Argument: msgId The numerical index of the message whose headers are requested.

errorInfo ()

Retrieves error information of this object. Valid only in case of state = error.

pop3SynConnection ()

Constructor. Just logs the event.

state ()

Retrieves state of this object.

~pop3SynConnection ()

Destructor. Closes an active socket and logs the event.


Membervariables

sock
The handle of the channel controlled by this object
state
The state of the last executed command.
error
The error message of the last executed, failed command.
greeting
The greeting sent by the pop3 server during the initialization of the connection (Open).
n
The number of messages in the mailbox we are connected to, as given by STAT (see SetN).
backsignal
The variable to set by the callback method to signal the end of the operation.

Generated by AutoDoc 2.4 at 09/14/2000, invoked by Andreas Kupries