This class is meant to simplify the client usage providing a proxy
class that merges the SAMPClient and SAMPHubProxy functionalities in a simplified API.
|
__init__(self,
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)
SAMPIntegratedClient constructor. |
|
|
|
|
boolean
|
isConnected(self)
Testing method to verify the client connection with a running Hub. |
|
|
|
connect(self,
hub_params=None,
user=None,
password=None,
key_file=None,
cert_file=None,
cert_reqs=0,
ca_certs=None,
ssl_version=1)
Connect with the current or specified SAMP Hub, start and register
the client. |
|
|
|
disconnect(self)
Unregister the client from the current SAMP Hub, stop the client and
disconnect from the Hub. |
|
|
|
ping(self)
Proxy to ping SAMP Hub method (Standard Profile only) |
|
|
|
declareMetadata(self,
metadata)
Proxy to declareMetadata SAMP Hub method |
|
|
|
getMetadata(self,
client_id)
Proxy to getMetadata SAMP Hub method |
|
|
|
getSubscriptions(self,
client_id)
Proxy to getSubscriptions SAMP Hub method |
|
|
|
getRegisteredClients(self)
Proxy to getRegisteredClients SAMP Hub method |
|
|
|
getSubscribedClients(self,
mtype)
Proxy to getSubscribedClients SAMP Hub method |
|
|
|
notify(self,
recipient_id,
message)
Proxy to notify SAMP Hub method |
|
|
|
enotify(self,
recipient_id,
mtype,
**params)
Easy notify . |
|
|
|
notifyAll(self,
message)
Proxy to notifyAll SAMP Hub method |
|
|
|
|
|
call(self,
recipient_id,
msg_tag,
message)
Proxy to call SAMP Hub method |
|
|
|
ecall(self,
recipient_id,
msg_tag,
mtype,
**params)
Easy call . |
|
|
|
callAll(self,
msg_tag,
message)
Proxy to callAll SAMP Hub method |
|
|
|
ecallAll(self,
msg_tag,
mtype,
**params)
Easy callAll . |
|
|
|
callAndWait(self,
recipient_id,
message,
timeout)
Proxy to callAndWait SAMP Hub method. |
|
|
|
ecallAndWait(self,
recipient_id,
mtype,
timeout,
**params)
Easy callAndWait . |
|
|
|
reply(self,
msg_id,
response)
Proxy to reply SAMP Hub method |
|
|
|
ereply(self,
msg_id,
status,
result=None,
error=None)
Easy reply . |
|
|
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). |
|
|
|
|
|
|
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__
|