Manage Connections
Manage peer connections that the agent has established
Get a Connection by ID
let id: String // ID of the connection to get ([Connection.connectionId])
do {
let connection = try await agent.connections.getById(connectionId: id)
} catch {
// handle error
}val id: String // ID of the connection to get ([Connection.connectionId])
launch {
try {
val connection = agent.connections.getById(id)
} catch (e: ConnectionsModule.GetException) {
// Handle exception
}
}Delete a Connection by ID
let id: String // ID of the connection to delete ([Connection.connectionId])
do {
try await agent.connections.deleteById(connectionId: id)
} catch {
// handle error
}val id: String // ID of the connection to delete ([Connection.connectionId])
launch {
try {
agent.connections.deleteById(id)
} catch (e: ConnectionsModule.DeleteException) {
// Handle exception
}
}Updating the Metadata of a Connection
Listing Connections
Filtered Listing
Last updated