Connection
namespace: privmx::endpoint::core
Connection represents and manages the current connection between the Endpoint and the Bridge server.
Static Methods
connect
Connects to the PrivMX Bridge server.
static Connection connect(
const std::string &userPrivKey
const std::string &solutionId
const std::string &bridgeUrl
)
Name | Type | Description |
---|---|---|
userPrivKey | const std::string & | user's private key |
solutionId | const std::string & | ID of the Solution |
bridgeUrl | const std::string & | Bridge Server URL |
Type | Description |
---|---|
Connection | Connection object |
connectPublic
Connects to the PrivMX Bridge Server as a guest user.
static Connection connectPublic(
const std::string &solutionId
const std::string &bridgeUrl
)
Name | Type | Description |
---|---|---|
solutionId | const std::string & | ID of the Solution |
bridgeUrl | const std::string & | Bridge Server URL |
Type | Description |
---|---|
Connection | Connection object |
Methods
getConnectionId
Gets the ID of the current connection.
int64_t getConnectionId()
Type | Description |
---|---|
int64_t | ID of the connection |
listContexts
Gets a list of Contexts available for the user.
PagingList< Context > listContexts(
const PagingQuery &pagingQuery
)
Name | Type | Description |
---|---|---|
pagingQuery | const PagingQuery & | struct with list query parameters |
Type | Description |
---|---|
PagingList<Context> | struct containing a list of Contexts |
disconnect
Disconnects from the PrivMX Bridge server.
void disconnect()