Home  > 

Class connection

A channel for communication between two peers on a network.

In current implementations, a connection corresponds to a TCP connection, represented by a transport.

A connection object contains zero or more session objects, which in turn contain zero or more senders and zero or more receivers.

Basic properties and methods

PropertySummaryTypeDefault valueMutableNullable
client The client holding this endpoint objectclientinstance
default-session The session used by `open-sender` and `open-receiver`sessioninstance
default-sender The sender used by `connection.send`sessioninstance
MethodSummaryInputsOutputs
wait Block until the remote peer confirms the open operation[timeout]endpoint
(async) wait Wait until the remote peer confirms the open operationtask of endpoint

Endpoint lifecycle

PropertySummaryTypeDefault valueMutableNullable
state The remote endpoint stateendpoint-statediscovered
error The remote endpoint error conditionerror-conditiondiscovered
MethodSummaryInputsOutputs
close Start closing the endpoint[error-condition]future of endpoint
(async) close Start closing the endpoint[error-condition]task of endpoint

Extended attributes

PropertySummaryTypeDefault valueMutableNullable
properties Application-defined propertiesmap of symbolobjectdiscovered
offered-capabilities Extensions the endpoint supportsarray of symboldiscovered
desired-capabilities Extensions the endpoint can usearray of symboldiscovered

Sender and receiver operations

MethodSummaryInputsOutputs
open-sender Create and open a sender using the default sessionaddress, [sender-options]sender
open-anonymous-sender Create and open a sender with no target address using the default session[sender-options]sender
open-receiver Create and open a receiver using the default sessionaddress, [receiver-options]receiver
open-dynamic-receiver Create and open a dynamic receiver using the default session[receiver-options], [timeout]receiver
(async) open-dynamic-receiver Create and open a dynamic receiver using the default session[receiver-options]task of receiver

Session operations

MethodSummaryInputsOutputs
open-session Create and open a session[session-options]session

Message operations

MethodSummaryInputsOutputs
send Send a message using the default session and default sendermessagetracker
(async) send Send a message using the default session and default sendermessage, [timeout]task of tracker