Connection
'Connection' represents and manages the current connection between the Endpoint and the Bridge server.
Static Methods
connect
Connects to the PrivMX Bridge server.
Params
userPrivKey
const std::string &
user's private key
solutionId
const std::string &
ID of the Solution
bridgeUrl
const std::string &
Bridge Server URL
verificationOptions
const PKIVerificationOptions &
PrivMX Bridge server instance verification options using a PKI server
Returns
Connection
·
Connection object
connectPublic
Connects to the PrivMX Bridge Server as a guest user.
Params
solutionId
const std::string &
ID of the Solution
bridgeUrl
const std::string &
Bridge Server URL
verificationOptions
const PKIVerificationOptions &
PrivMX Bridge server instance verification options using a PKI server
Returns
Connection
·
Connection object
Methods
getConnectionId
Gets the ID of the current connection.
Returns
int64_t
·
ID of the connection
listContexts
Gets a list of Contexts available for the user.
Params
pagingQuery
const PagingQuery &
struct with list query parameters
Returns
PagingList<Context>
·
struct containing a list of Contexts
getContextUsers
Gets a list of users of given context.
Params
contextId
const std::string &
ID of the context
Returns
std::vector<UserInfo>
·
vector containing a list of users Info
disconnect
Disconnects from the PrivMX Bridge server.
setUserVerifier
Sets user's custom verification callback.
The feature allows the developer to set up a callback for user verification. A developer can implement an interface and pass the implementation to the function. Each time data is read from the container, a callback will be triggered, allowing the developer to validate the sender in an external service, e.g. Developer's Application Server or PKI Server.
Params
verifier
std::shared_ptr<UserVerifierInterface>
an implementation of the UserVerifierInterface
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.