SAMPHubProxy¶
- class astropy.samp.SAMPHubProxy[source]¶
Bases:
objectProxy class to simplify the client interaction with a SAMP hub (via the standard profile).
Attributes Summary
Whether the hub proxy is currently connected to a hub.
Methods Summary
call(private_key, recipient_id, msg_tag, message)Proxy to
callSAMP Hub method.call_all(private_key, msg_tag, message)Proxy to
callAllSAMP Hub method.call_and_wait(private_key, recipient_id, ...)Proxy to
callAndWaitSAMP Hub method.connect([hub, hub_params, pool_size])Connect to the current SAMP Hub.
declare_metadata(private_key, metadata)Proxy to
declareMetadataSAMP Hub method.declare_subscriptions(private_key, subscriptions)Proxy to
declareSubscriptionsSAMP Hub method.Disconnect from the current SAMP Hub.
get_metadata(private_key, client_id)Proxy to
getMetadataSAMP Hub method.get_registered_clients(private_key)Proxy to
getRegisteredClientsSAMP Hub method.get_subscribed_clients(private_key, mtype)Proxy to
getSubscribedClientsSAMP Hub method.get_subscriptions(private_key, client_id)Proxy to
getSubscriptionsSAMP Hub method.notify(private_key, recipient_id, message)Proxy to
notifySAMP Hub method.notify_all(private_key, message)Proxy to
notifyAllSAMP Hub method.ping()Proxy to
pingSAMP Hub method (Standard Profile only).register(secret)Proxy to
registerSAMP Hub method.reply(private_key, msg_id, response)Proxy to
replySAMP Hub method.set_xmlrpc_callback(private_key, xmlrpc_addr)Proxy to
setXmlrpcCallbackSAMP Hub method (Standard Profile only).unregister(private_key)Proxy to
unregisterSAMP Hub method.Attributes Documentation
- is_connected¶
Whether the hub proxy is currently connected to a hub.
Methods Documentation
- call_and_wait(private_key, recipient_id, message, timeout)[source]¶
Proxy to
callAndWaitSAMP Hub method.
- connect(hub=None, hub_params=None, pool_size=20)[source]¶
Connect to the current SAMP Hub.
- Parameters:
- hub
SAMPHubServer, optional The hub to connect to.
- hub_params
dict, optional Optional dictionary containing the lock-file content of the Hub with which to connect. This dictionary has the form
{<token-name>: <token-string>, ...}.- pool_size
int, optional The number of socket connections opened to communicate with the Hub.
- hub
- declare_subscriptions(private_key, subscriptions)[source]¶
Proxy to
declareSubscriptionsSAMP Hub method.