A.2. Managing Connections

All the communication between nodes is encrypted for higher security. Every node involved in the simulation has an unique RSA key pair for authentication during the connection creation process. After the successful authentication the server generates a Blowfish ciphre which is used for both the UDP and TCP buffers encryption. Because this guarantees better performance but lower security than RSA encryption/decryption, this key is periodically regenerated if the connection is used for a longer time (this time value is also cofigurable via settings). The Network implements the connection auto-close feature between some types of nodes (Server-Server or DataService-Server) to save resources and optimize the network performance. Any auto-closed connection still seems to be open to the higher levels; in case there is some request, the connection is transparently established again and the data delivered as if no connection close had ever occured. This feature can be managed from higher layers.

Network      net;
NodeId       nodeid = ...;

net.control_connection_auto_close( nodeid, true );
  // This enables auto close feature to node nodeid.

When some node wants to auto-close a connection to another node, it sends a request and waits for permission. The reply depends on auto-close connection feature setting on the other node.