Int16StringProtocol Class Reference

Inheritance diagram for Int16StringProtocol:

Inheritance graph
[legend]
List of all members.

Public Member Functions

def __init__
def readable
def writable
def handle_read
def handle_write
def stringReceived
 Receive a string from the socket.
def sendString
 Send a string through the socket.

Static Public Attributes

int MAXSTRINGLEN = 0xffff

Private Attributes

 __readBuffer
 __writeBuffer
 __writeLock

Detailed Description

Defines a protocol where the messages passed are of the format
   "XX<string>" where <string> is an arbitrary string and XX the
   length of this string expressed as a ushort.  The max length of
   <string> is 0xffff bytes.  Locks are used to prevent buffer overwrites.

Definition at line 26 of file StringTcpProtocol.py.


Member Function Documentation

def __init__   self,
  port = None
 

Definition at line 29 of file StringTcpProtocol.py.

def handle_read   self  ) 
 

Read the socket and parse into messages.

Definition at line 45 of file StringTcpProtocol.py.

def handle_write   self  ) 
 

Definition at line 59 of file StringTcpProtocol.py.

def readable   self  ) 
 

Definition at line 36 of file StringTcpProtocol.py.

def sendString   self,
  data
 

Send a string through the socket.

Parameters:
data String data to send through the socket.
If len(data) > 0xffff, ValueError is raised.

Definition at line 73 of file StringTcpProtocol.py.

def stringReceived   self,
  line
 

Receive a string from the socket.

Parameters:
line The string from the socket

Reimplemented in CurrValClient, and SocketCVTClient.

Definition at line 65 of file StringTcpProtocol.py.

def writable   self  ) 
 

Definition at line 39 of file StringTcpProtocol.py.


Member Data Documentation

__readBuffer [private]
 

Definition at line 32 of file StringTcpProtocol.py.

__writeBuffer [private]
 

Definition at line 33 of file StringTcpProtocol.py.

__writeLock [private]
 

Definition at line 34 of file StringTcpProtocol.py.

int MAXSTRINGLEN = 0xffff [static]
 

Definition at line 28 of file StringTcpProtocol.py.


The documentation for this class was generated from the following file:
Generated on Thu Apr 27 20:53:13 2006 for LICOS L02-01-00 by doxygen 1.4.6-NO