Utility class which provides facilities to create and manage a SAMP
compliant XML-RPC server that acts as SAMP callable client
application.
|
__init__(self,
hub,
metadata=None,
addr=None,
port=0,
https=False,
key_file=None,
cert_file=None,
cert_reqs=0,
ca_certs=None,
ssl_version=2,
callable=True)
SAMPClient
constructor. |
|
|
|
|
|
start(self)
Start the client in a non-blocking way. |
|
|
|
stop(self)
Stop the client. |
|
|
boolean
|
isRunning(self)
Return an information concerning the client running status. |
|
|
str
|
receiveNotification(self,
private_key,
sender_id,
message)
Standard callable client receiveNotification method. |
|
|
str
|
receiveCall(self,
private_key,
sender_id,
msg_id,
message)
Standard callable client receiveCall method. |
|
|
str
|
receiveResponse(self,
private_key,
responder_id,
msg_tag,
response)
Standard callable client receiveResponse method. |
|
|
|
bindReceiveMessage(self,
mtype,
function,
declare=True,
metadata=None)
Bind a specific MType to a function or class method, being intended
for a call or a notification. |
|
|
|
bindReceiveNotification(self,
mtype,
function,
declare=True,
metadata=None)
Bind a specific MType notification to a function or class method. |
|
|
|
bindReceiveCall(self,
mtype,
function,
declare=True,
metadata=None)
Bind a specific MType call to a function or class method. |
|
|
|
bindReceiveResponse(self,
msg_tag,
function)
Bind a specific msg-tag response to a function or class method. |
|
|
|
unbindReceiveNotification(self,
mtype,
declare=True)
Remove from the notifications binding table the specified MType and
unsubscribe the client from it (if required). |
|
|
|
unbindReceiveCall(self,
mtype,
declare=True)
Remove from the calls binding table the specified MType and
unsubscribe the client from it (if required). |
|
|
|
|
|
|
|
register(self)
Register the client to the SAMP Hub. |
|
|
|
unregister(self)
Unregister the client from the SAMP Hub. |
|
|
|
declareMetadata(self,
metadata=None)
Declare the client application metadata supported. |
|
|
string
|
getPrivateKey(self)
Return the client private key used for the Standard Profile
communications obtained at registration time
(samp.private-key ). |
|
|
string
|
getPublicId(self)
Return public client ID obtained at registration time
(samp.self-id ). |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|