SAMPHubProxy¶
-
class
astropy.vo.samp.SAMPHubProxy[source] [edit on github]¶ Bases:
objectProxy class to simplify the client interaction with a SAMP hub (via the standard profile).
Attributes Summary
is_connectedWhether 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, key_file, ...])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()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.server_close()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(private_key, recipient_id, msg_tag, message)[source] [edit on github]¶ Proxy to
callSAMP Hub method.
-
call_all(private_key, msg_tag, message)[source] [edit on github]¶ Proxy to
callAllSAMP Hub method.
-
call_and_wait(private_key, recipient_id, message, timeout)[source] [edit on github]¶ Proxy to
callAndWaitSAMP Hub method.
-
connect(hub=None, hub_params=None, key_file=None, cert_file=None, cert_reqs=0, ca_certs=None, ssl_version=None, pool_size=20)[source] [edit on github]¶ Connect to the current SAMP Hub.
Parameters: hub :
SAMPHubServer, optionalThe 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>, ...}.key_file : str, optional
The path to a file containing the private key for SSL connections. If the certificate file (
cert_file) contains the private key, thenkey_filecan be omitted.cert_file : str, optional
The path to a file which contains a certificate to be used to identify the local side of the secure connection.
cert_reqs : int, optional
Whether a certificate is required from the server side of the connection, and whether it will be validated if provided. It must be one of the three values
ssl.CERT_NONE(certificates ignored),ssl.CERT_OPTIONAL(not required, but validated if provided), orssl.CERT_REQUIRED(required and validated). If the value of this parameter is notssl.CERT_NONE, then theca_certsparameter must point to a file of CA certificates.ca_certs : str, optional
The path to a file containing a set of concatenated “Certification Authority” certificates, which are used to validate the certificate passed from the Hub end of the connection.
ssl_version : int, optional
Which version of the SSL protocol to use. Typically, the server chooses a particular protocol version, and the client must adapt to the server’s choice. Most of the versions are not interoperable with the other versions. If not specified, the default SSL version is taken from the default in the installed version of the Python standard
ssllibrary. See thessldocumentation for more information.pool_size : int, optional
The number of socket connections opened to communicate with the Hub.
-
declare_metadata(private_key, metadata)[source] [edit on github]¶ Proxy to
declareMetadataSAMP Hub method.
-
declare_subscriptions(private_key, subscriptions)[source] [edit on github]¶ Proxy to
declareSubscriptionsSAMP Hub method.
-
disconnect()[source] [edit on github]¶ Disconnect from the current SAMP Hub.
-
get_metadata(private_key, client_id)[source] [edit on github]¶ Proxy to
getMetadataSAMP Hub method.
-
get_registered_clients(private_key)[source] [edit on github]¶ Proxy to
getRegisteredClientsSAMP Hub method.
-
get_subscribed_clients(private_key, mtype)[source] [edit on github]¶ Proxy to
getSubscribedClientsSAMP Hub method.
-
get_subscriptions(private_key, client_id)[source] [edit on github]¶ Proxy to
getSubscriptionsSAMP Hub method.
-
notify(private_key, recipient_id, message)[source] [edit on github]¶ Proxy to
notifySAMP Hub method.
-
notify_all(private_key, message)[source] [edit on github]¶ Proxy to
notifyAllSAMP Hub method.
-
ping()[source] [edit on github]¶ Proxy to
pingSAMP Hub method (Standard Profile only).
-
register(secret)[source] [edit on github]¶ Proxy to
registerSAMP Hub method.
-
reply(private_key, msg_id, response)[source] [edit on github]¶ Proxy to
replySAMP Hub method.
-
server_close()[source] [edit on github]¶
-
set_xmlrpc_callback(private_key, xmlrpc_addr)[source] [edit on github]¶ Proxy to
setXmlrpcCallbackSAMP Hub method (Standard Profile only).
-
unregister(private_key)[source] [edit on github]¶ Proxy to
unregisterSAMP Hub method.
-