Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

DataDistributorServer Class Reference

Data Distributor Server. More...

List of all members.

Public Member Functions

 __init__ (name=None, size=321024)
 connect (server, interface=socket.gethostname())
 disconnect ()
 publish (data)


Detailed Description

Data Distributor Server.

Definition at line 11 of file DataDistributor.py.


Member Function Documentation

__init__ name  = None,
size  = 321024
 

Data Distributor server constructor.

Parameters:
name The name of the type of data to be served. See the DataDistributorAddress class.
size The size in bytes of the buffer to allocate for sending the data. This is used to set the socket send buffer size.

connect server  ,
interface  = socket.gethostname()
 

Method to set up a socket and connect to it.

Parameters:
server The address of a socket on which to serve the data. This address must be the same for both server and client. The value can be in one of the following forms:
  • A number of which only the two lower decimal digits are used, i.e., in the range 0-99
  • <port><multicast address>, where <port> is a value that will override what is found from the data type name translation, and <multicast address=""> is some valid multicast IP address starting with the value 239. A name may be used for the <multicast address=""> value as well, as long as it can be found in the name server and translates to a valid multicast IP address.
  • <multicast address="">, as discussed in the previous bullet. The port value is taken to be the one found from looking up the data type name in the port table.
interface The network interface to send multicast traffic on. Defaults to 'the primary network interface', however 'primary' is defined. See socket.gethostbyname_ex() documentation.

disconnect  ) 
 

Gracefully shut down the socket.

publish data   ) 
 

Publish the data on the multicast socket.

Parameters:
data The data to be sent out on the multicast socket.


The documentation for this class was generated from the following file:
Generated on Fri Jul 21 13:26:41 2006 for LATTE R04-12-00 by doxygen 1.4.3