Hub discovery
SAMP.AbstractSAMPHub
— TypeThe parent of SAMPHub
and SAMPWebHub
.
SAMP.SAMPHub
— TypeSAMPHub <: [`SAMP.AbstractSAMPHub`](@ref)
A local SAMP hub.
Can be created by a simple call SAMPHub()
: all fields are automatically set following the SAMP protocol.
Members
- proxy: the XMLRPC proxy associated with the hub
- url: the hub URL
- secret: the hub secret (used for the client registration)
- version: the hub version, as a string
- conf: a dictionary with all hub configuration parameters
SAMP.SAMPWebHub
— TypeSAMPWebHub <: [`SAMP.AbstractSAMPHub`](@ref)
A Web SAMP hub.
Can be created by a simple call SAMPWebHub()
: all fields are automatically set following the SAMP protocl.
Members
- proxy: the XMLRPC proxy associated with the hub
- url: the hub URL (always equal to "http://localhost:21012/")
SAMP.defaultHub
— ConstantdefaultHub::Union{SAMPHub,Nothing}
The default hub.
Can be obtained (and set, if it is nothing
) using getHub
.
SAMP.getHub
— FunctiongetHub()
Return the default hub.
This function also sets it the first time it is called.
SAMP.ping
— Functionping(hub)
Ping the hub
.
This function retunrs nothing
if the hub can be pinged; otherwise, an error is thrown.
ping(client, dest=client.client_id)
pint(dest)
Ping id
; return nothing
in case of success.