Skip to main content
reference

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
)

NameTypeDescription
userPrivKeyconst std::string &user's private key
solutionIdconst std::string &ID of the Solution
bridgeUrlconst std::string &Bridge Server URL

TypeDescription
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
)

NameTypeDescription
solutionIdconst std::string &ID of the Solution
bridgeUrlconst std::string &Bridge Server URL

TypeDescription
Connection Connection object

Methods

getConnectionId

Gets the ID of the current connection.

int64_t getConnectionId()

TypeDescription
int64_t ID of the connection

listContexts

Gets a list of Contexts available for the user.

PagingList< Context > listContexts(
const PagingQuery &pagingQuery
)

NameTypeDescription
pagingQueryconst PagingQuery &struct with list query parameters

TypeDescription
PagingList<Context> struct containing a list of Contexts

disconnect

Disconnects from the PrivMX Bridge server.

void disconnect()