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.
| Property | Summary | Type | Default value | Mutable | Nullable |
|---|---|---|---|---|---|
| client | The client holding this endpoint object | client | instance | ☐ | ☐ |
| default-session | The session used by `open-sender` and `open-receiver` | session | instance | ☐ | ☐ |
| default-sender | The sender used by `connection.send` | session | instance | ☐ | ☐ |
| Method | Summary | Inputs | Outputs |
|---|---|---|---|
| wait | Block until the remote peer confirms the open operation | [timeout] | endpoint |
| (async) wait | Wait until the remote peer confirms the open operation | task of endpoint |
| Property | Summary | Type | Default value | Mutable | Nullable |
|---|---|---|---|---|---|
| state | The remote endpoint state | endpoint-state | discovered | ☐ | ☐ |
| error | The remote endpoint error condition | error-condition | discovered | ☐ | ☒ |
| Method | Summary | Inputs | Outputs |
|---|---|---|---|
| close | Start closing the endpoint | [error-condition] | future of endpoint |
| (async) close | Start closing the endpoint | [error-condition] | task of endpoint |
| Property | Summary | Type | Default value | Mutable | Nullable |
|---|---|---|---|---|---|
| properties | Application-defined properties | map of symbol ⇒ object | discovered | ☐ | ☒ |
| offered-capabilities | Extensions the endpoint supports | array of symbol | discovered | ☐ | ☒ |
| desired-capabilities | Extensions the endpoint can use | array of symbol | discovered | ☐ | ☒ |
| Method | Summary | Inputs | Outputs |
|---|---|---|---|
| open-sender | Create and open a sender using the default session | address, [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 session | address, [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 |
| Method | Summary | Inputs | Outputs |
|---|---|---|---|
| open-session | Create and open a session | [session-options] | session |
| Method | Summary | Inputs | Outputs |
|---|---|---|---|
| send | Send a message using the default session and default sender | message | tracker |
| (async) send | Send a message using the default session and default sender | message, [timeout] | task of tracker |