Modification to the Communication framework API.

- Simplified the communication API and made it easier to change
  to encrypted connections by not having separate variables to
  define encrypted and unencrypted ports.

- Now, to enable listening without configuring nodes just
  load the frameworks/communication/listen script.

- If encrypted listening is desired set the following:
	redef Communication::listen_encrypted=T;

- Accompanying test updates.
This commit is contained in:
Seth Hall 2011-10-07 13:29:26 -04:00
parent 250fb3c352
commit da9b8cc283
16 changed files with 38 additions and 64 deletions

View file

@ -21,10 +21,10 @@ redef peer_description = Cluster::node;
# Don't load the listening script until we're a bit more sure that the
# cluster framework is actually being enabled.
@load frameworks/communication/listen-clear
@load frameworks/communication/listen
## Set the port that this node is supposed to listen on.
redef Communication::listen_port_clear = Cluster::nodes[Cluster::node]$p;
redef Communication::listen_port = Cluster::nodes[Cluster::node]$p;
@if ( Cluster::local_node_type() == Cluster::MANAGER )
@load ./nodes/manager