Session class
A Zenoh session.
Wraps z_owned_session_t. Use Session.open to create a session,
optionally passing a Config. Call close when done to gracefully
shut down the session and release native resources.
Properties
Methods
-
close(
) → void - Gracefully closes the session and releases native resources.
-
declareAdvancedPublisher(
String keyExpr, {AdvancedPublisherOptions? options}) → AdvancedPublisher -
Declares an advanced publisher on the given
keyExpr. -
declareAdvancedSubscriber(
String keyExpr, {AdvancedSubscriberOptions options = const AdvancedSubscriberOptions()}) → AdvancedSubscriber -
Declares an advanced subscriber on the given
keyExpr. -
declareBackgroundSubscriber(
String keyExpr) → Stream< Sample> -
Declares a background subscriber on the given
keyExpr. -
declareLivelinessSubscriber(
String keyExpr, {bool history = false}) → Subscriber -
Declares a liveliness subscriber on the given
keyExpr. -
declareLivelinessToken(
String keyExpr) → LivelinessToken -
Declares a liveliness token on the given
keyExpr. -
declarePublisher(
String keyExpr, {Encoding? encoding, CongestionControl congestionControl = CongestionControl.block, Priority priority = Priority.data, bool isExpress = false, bool enableMatchingListener = false}) → Publisher -
Declares a publisher on the given
keyExpr. -
declarePullSubscriber(
String keyExpr, {int capacity = 256}) → PullSubscriber -
Declares a pull subscriber on the given
keyExpr. -
declareQuerier(
String keyExpr, {QueryTarget target = QueryTarget.bestMatching, ConsolidationMode consolidation = ConsolidationMode.auto, Duration? timeout, bool enableMatchingListener = false}) → Querier -
Declares a querier on the given
keyExpr. -
declareQueryable(
String keyExpr, {bool complete = false}) → Queryable -
Declares a queryable on the given
keyExpr. -
declareSubscriber(
String keyExpr) → Subscriber -
Declares a subscriber on the given
keyExpr. -
deleteResource(
String keyExpr) → void -
Deletes a resource on the given
keyExpr. -
get(
String selector, {String? parameters, ZBytes? payload, Encoding? encoding, ZBytes? attachment, QueryTarget target = QueryTarget.bestMatching, ConsolidationMode consolidation = ConsolidationMode.auto, Duration? timeout}) → Stream< Reply> -
Sends a query on the given
selectorand returns a stream of replies. -
livelinessGet(
String keyExpr, {Duration? timeout}) → Stream< Reply> -
Queries liveliness tokens matching the given
keyExpr. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
peersZid(
) → List< ZenohId> - Returns the ZenohIds of all connected peers.
-
put(
String keyExpr, String value, {Encoding? encoding, ZBytes? attachment}) → void -
Publishes a string
valueon the givenkeyExpr. -
putBytes(
String keyExpr, ZBytes payload, {Encoding? encoding, ZBytes? attachment}) → void -
Publishes a ZBytes
payloadon the givenkeyExpr. -
routersZid(
) → List< ZenohId> - Returns the ZenohIds of all connected routers.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited