Package lemon :: Package external :: Package gadfly :: Module gfsocket
[show private | hide private]
[frames | no frames]

Module lemon.external.gadfly.gfsocket

Socket interactions for gadfly client and server

:Author: Aaron Watters
:Maintainers: http://gadfly.sf.net/
:Copyright: Aaron Robert Watters, 1994
:Id: $Id: gfsocket.py,v 1.1 2003/08/12 09:17:12 thejimmyg Exp $:

Classes
Packet_Reader nonblocking pseudo-packet reader.

Function Summary
  certificate(String, password)
generate a certificate for a string, using a password...
  certify(String, cert, password)
check a certificate for a string...
  interpret_response(data)
interpret response data, raise exception if needed...
  recv_data(socket, timeout)
receive data or time out...
  reply(data, socket)
  reply_exception(exception, info, socket)
send an exception back to the client...
  reply_success(data, socket)
report success with data back to client...
  send_certified_action(actor_name, action, arguments, password, socket)
  send_len(data, socket)
send length of data as cr terminated int rep...
  send_packet(socket, data)
blast out a length marked packet...
  unpack_certified_data(data)

Variable Summary
int BLOCK_SIZE = 4028                                                                  
str DATA = 'DATA'
str ERROR = 'ERROR'
str EXCEPTION = 'EXCEPTION'
str LEN = 'LEN'
int LEN_LIMIT = 40280                                                                 
str READY = 'READY'
str SUCCESS = 'SUCCESS'

Function Details

certificate(String, password)

generate a certificate for a string, using a password

certify(String, cert, password)

check a certificate for a string

interpret_response(data)

interpret response data, raise exception if needed

recv_data(socket, timeout=10)

receive data or time out

reply_exception(exception, info, socket)

send an exception back to the client

reply_success(data, socket)

report success with data back to client

send_len(data, socket)

send length of data as cr terminated int rep

send_packet(socket, data)

blast out a length marked packet

Variable Details

BLOCK_SIZE

Type:
int
Value:
4028                                                                  

DATA

Type:
str
Value:
'DATA'                                                                 

ERROR

Type:
str
Value:
'ERROR'                                                                

EXCEPTION

Type:
str
Value:
'EXCEPTION'                                                            

LEN

Type:
str
Value:
'LEN'                                                                  

LEN_LIMIT

Type:
int
Value:
40280                                                                 

READY

Type:
str
Value:
'READY'                                                                

SUCCESS

Type:
str
Value:
'SUCCESS'                                                              

Generated by Epydoc 2.0 on Mon Nov 10 15:08:01 2003 http://epydoc.sf.net