Package AccessGrid :: Module NetworkAddressAllocator :: Class NetworkAddressAllocator
[show private | hide private]
[frames | no frames]

Class NetworkAddressAllocator

Known Subclasses:
MulticastAddressAllocator

This class provides a clean API for allocating general network addresses. For typical unicast networks this devolves to picking port numbers. So that's all that's done here.


Method Summary
  __init__(self, portBase, portMax)
We only need to initialize port information.
  AllocatePort(self, even)
if the even flag is set we allocate only an even port to support RTP standard use cases.
  AllocatePortInRange(self, even, portBase, portMax)
  GetAllocationMethod(self)
  RecyclePort(self, port)
  SetAllocationMethod(self, method)
  SetPortBase(self, portBase)
  SetPortMax(self, portMax)

Class Variable Summary
str INTERVAL = 'interval'
str RANDOM = 'random'

Method Details

__init__(self, portBase=49152, portMax=65535)
(Constructor)

We only need to initialize port information.

AllocatePort(self, even=0)

if the even flag is set we allocate only an even port to support RTP standard use cases.


Class Variable Details

INTERVAL

Type:
str
Value:
'interval'                                                             

RANDOM

Type:
str
Value:
'random'                                                               

Generated by Epydoc 2.1 on Thu Apr 14 16:39:28 2005 http://epydoc.sf.net