establish_connection(self,
force=True)
Establishes a connection with the Azureus server.
By invoking this method, this will ensure that other methods defined
by this class work correctly, as it will have references both to a
connection ID, and the ID for the plugin interface.
The force argument determines whether server
communication must take place or not. If True , then this
object will communicate with the Azureus server - if
False , then this object will only communicate with the
Azureus server if it has no recorded information about the plugin
interface.
This method has two uses, depending on the value of the
force argument - it can be used to ensure that there is a
valid recorded connection in place (if force is True ), or
it can be used just to ensure that other methods on this class will
behave properly (if force is False ).
If a new connection is established, then the _on_reconnect method will be invoked.
-
- Parameters:
force -
Boolean value indicating if communication with the server
must take place or not (default is True ).
- Returns:
-
None
|