Package Honey :: Package Fakes :: Package POP3 :: Module base_pop3 :: Class FakePOP3
[show private | hide private]
[frames | no frames]

Class FakePOP3

  object --+            
           |            
BaseProtocol --+        
               |        
     RawProtocol --+    
                   |    
        LineProtocol --+
                       |
                      FakePOP3


Define the POP3 Protocol
Method Summary
a new object with type S, a subtype of T __new__(S, ...)
  checkPassword(self)
Check passwords.
  connectionEstablished(self)
Callback
  connectionLost(self)
Callback
  dataReceived(self, data)
Process received data into lines (inherited from LineProtocol)
  do_AUTH_PASS(self, pswd)
PASS command at the AUTH phase
  do_AUTH_QUIT(self, arg)
Closes the connection
  do_AUTH_USER(self, user)
USER command at the AUTH phase
  do_ERROR(self, cmd, arg)
Error ocurred (invalid command)
  do_QUIT(self, arg)
Closes the connection
  do_TRAN_QUIT(self, arg)
Closes the connection
  do_UPDT_QUIT(self, arg)
Closes the connection
  greetClient(self)
Sends greeting to client upon connection
  lineLengthExceeded(self, line)
Callback called when a line exceeeds max length (inherited from LineProtocol)
  lineReceived(self, line)
Callback
  rawDataReceived(self, data)
Callback (inherited from LineProtocol)
  sendline(self, line)
Send a line. (inherited from LineProtocol)
  sendlines(self, lines)
Helper method
  setLineMode(self, extra)
Enter line mode (inherited from LineProtocol)
  setRawMode(self)
Enter Raw mode (inherited from LineProtocol)
  wrongPassword(self)
Callback

Class Variable Summary
bool fail
NoneType pswd
str state
NoneType user

Method Details

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

checkPassword(self)

Check passwords.

This default implementation always return false, i.e., all clients will fail

connectionEstablished(self)

Callback

called when client connects

connectionLost(self)

Callback

called when client closes

do_AUTH_PASS(self, pswd)

PASS command at the AUTH phase

do_AUTH_QUIT(self, arg=None)

Closes the connection

do_AUTH_USER(self, user)

USER command at the AUTH phase

do_ERROR(self, cmd, arg)

Error ocurred (invalid command)

do_QUIT(self, arg=None)

Closes the connection

do_TRAN_QUIT(self, arg=None)

Closes the connection

do_UPDT_QUIT(self, arg=None)

Closes the connection

greetClient(self)

Sends greeting to client upon connection

lineReceived(self, line)

Callback

called when client sends data

sendlines(self, lines)

Helper method

if lines is a string, send ut if lines is a tuple or list, send each string

wrongPassword(self)

Callback

Called by the server at the end of failed auth timeout

Class Variable Details

fail

Type:
bool
Value:
False                                                                  

pswd

Type:
NoneType
Value:
None                                                                   

state

Type:
str
Value:
'AUTH_'                                                                

user

Type:
NoneType
Value:
None                                                                   

Generated by Epydoc 1.1 on Sun Dec 7 16:05:40 2003 http://epydoc.sf.net