ConnectionManager¶
-
class
secsgem.hsms.connectionmanager.
HsmsConnectionManager
[source]¶ Bases:
object
High level class that handles multiple active and passive connections and the model for them.
-
events
¶ Property for event handling.
-
has_connection_to
(index)[source]¶ Check if connection to certain peer exists.
Parameters: index (string) – Name of the reqested handler. Returns: Is peer available Return type: boolean
-
static
get_connection_id
(address)[source]¶ Generate connection ids used for internal indexing.
Parameters: address (string) – The IP address for the affected remote.
-
add_peer
(name, address, port, active, session_id, connection_handler=<class 'secsgem.hsms.protocol.HsmsProtocol'>)[source]¶ Add a new connection.
Parameters: - name (string) – Name of the peers configuration
- address (string) – IP address of peer
- port (integer) – TCP port of peer
- active (boolean) – Is the connection active (True) or passive (False)
- session_id (integer) – session / device ID of peer
- connection_handler (inherited from
secsgem.hsms.protocol.HsmsProtocol
) – Model handling this connection
-