Skip to content
Ben edited this page Aug 8, 2016 · 4 revisions

Connecting and Registering at the Core

After you created your Plugin object, connecting and registering the plug-in is quite simple.

import Splonecli.Api.plugin.RemoteError


my_plugin.connect("hostname", <port>) # connects to the splonebox
try:
  my_plugin.register() # registers at the splonebox
except RemoteError as e:
  print(e)

If the register call fails, a RemoteError exception is raised.

Note: The register call is blocking by default! If you want non blocking behavior use the optional blocking parameter

Clone this wiki locally