SAMPHubProxy¶
- class astropy.samp.SAMPHubProxy[源代码]¶
基类:
object
代理类简化与SAMP中心的客户机交互(通过标准概要文件)。
属性摘要
集线器代理当前是否连接到集线器。
方法总结
call
(private_key, recipient_id, msg_tag, message)代理人
call
SAMP Hub方法。call_all
(private_key, msg_tag, message)代理人
callAll
SAMP Hub方法。call_and_wait
(private_key, recipient_id, ...)代理人
callAndWait
SAMP Hub方法。connect
([hub, hub_params, pool_size])连接到当前的SAMP集线器。
declare_metadata
(private_key, metadata)代理人
declareMetadata
SAMP Hub方法。declare_subscriptions
(private_key, subscriptions)代理人
declareSubscriptions
SAMP Hub方法。disconnect
\()断开与当前SAMP集线器的连接。
get_metadata
(private_key, client_id)代理人
getMetadata
SAMP Hub方法。get_registered_clients
(private_key)代理人
getRegisteredClients
SAMP Hub方法。get_subscribed_clients
(private_key, mtype)代理人
getSubscribedClients
SAMP Hub方法。get_subscriptions
(private_key, client_id)代理人
getSubscriptions
SAMP Hub方法。notify
(private_key, recipient_id, message)代理人
notify
SAMP Hub方法。notify_all
(private_key, message)代理人
notifyAll
SAMP Hub方法。ping
\()代理人
ping
SAMP Hub方法(仅标准配置文件)。register
\(机密)代理人
register
SAMP Hub方法。reply
(private_key, msg_id, response)代理人
reply
SAMP Hub方法。set_xmlrpc_callback
(private_key, xmlrpc_addr)代理人
setXmlrpcCallback
SAMP Hub方法(仅标准配置文件)。unregister
(private_key)代理人
unregister
SAMP Hub方法。属性文档
- is_connected¶
集线器代理当前是否连接到集线器。
方法文件
- connect(hub=None, hub_params=None, pool_size=20)[源代码]¶
连接到当前的SAMP集线器。
- 参数
- hub :
SAMPHubServer
可选SAMPHubServer,可选 要连接到的集线器。
- hub_params可选的
包含要连接的集线器的锁定文件内容的可选字典。这本词典有
{{<token-name>: <token-string>, ...}}
.- pool_size可选的
为与集线器通信而打开的套接字连接数。
- hub :