Class BoundPeerExtensions
This extension class activates transport-oriented methods on BoundPeer.
Namespace: Libplanet.Net.Transports
Assembly: Libplanet.dll
Syntax
public static class BoundPeerExtensions : object
Methods
| Improve this Doc View SourceQueryAppProtocolVersionNetMQ(BoundPeer, Nullable<TimeSpan>)
Queries AppProtocolVersion of given BoundPeer specialized for NetMQ based transport.
Declaration
public static AppProtocolVersion QueryAppProtocolVersionNetMQ(this BoundPeer peer, TimeSpan? timeout = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BoundPeer | peer | The BoundPeer to query AppProtocolVersion. |
| Nullable<TimeSpan> | timeout | Timeout value for request. |
Returns
| Type | Description |
|---|---|
| AppProtocolVersion | AppProtocolVersion of given peer. |
QueryAppProtocolVersionTcp(BoundPeer, Nullable<TimeSpan>, CancellationToken)
Queries AppProtocolVersion of given BoundPeer specialized for TCP based transport.
Declaration
public static async Task<AppProtocolVersion> QueryAppProtocolVersionTcp(this BoundPeer peer, TimeSpan? timeout = null, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BoundPeer | peer | The BoundPeer to query AppProtocolVersion. |
| Nullable<TimeSpan> | timeout | Timeout value for request. |
| CancellationToken | cancellationToken | A cancellation token used to propagate notification that this operation should be canceled. |
Returns
| Type | Description |
|---|---|
| Task<AppProtocolVersion> | AppProtocolVersion of given peer. |