PrivMX DOCS
API Reference/PrivMX Endpoint/Core

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

static Connection connect(
const std::string &userPrivKey
const std::string &solutionId
const std::string &bridgeUrl
)

Returns

[Connection](/reference/cpp/endpoint/core/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

static Connection connectPublic(
const std::string &solutionId
const std::string &bridgeUrl
)

Returns

[Connection](/reference/cpp/endpoint/core/connection) · Connection object

Methods

getConnectionId

Gets the ID of the current connection.

int64_t getConnectionId()

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

PagingList< Context > listContexts(
const PagingQuery &pagingQuery
)

Returns

[PagingList](/reference/cpp/endpoint/core/types#paginglist)<[Context](/reference/cpp/endpoint/core/types#context)> · struct containing a list of Contexts

disconnect

Disconnects from the PrivMX Bridge server.

void disconnect()