From 6b1cf37b2bf91d8dde65c5f3fade48e4a323348c Mon Sep 17 00:00:00 2001 From: Muzzammil Shahid Date: Fri, 20 Dec 2024 13:13:51 +0500 Subject: [PATCH] Rename endpoint to invocationHandler and to eventHandler --- lib/src/session.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/src/session.dart b/lib/src/session.dart index 7364976..518b399 100644 --- a/lib/src/session.dart +++ b/lib/src/session.dart @@ -176,13 +176,13 @@ class Session { Future register( String procedure, - Result Function(Invocation invocation) endpoint, { + Result Function(Invocation invocation) invocationHandler, { Map? options, }) { var register = msg.Register(_nextID, procedure, options: options); var completer = Completer(); - _registerRequests[register.requestID] = RegisterRequest(completer, endpoint); + _registerRequests[register.requestID] = RegisterRequest(completer, invocationHandler); _baseSession.send(_wampSession.sendMessage(register)); @@ -221,11 +221,12 @@ class Session { return null; } - Future subscribe(String topic, void Function(Event event) endpoint, {Map? options}) { + Future subscribe(String topic, void Function(Event event) eventHandler, + {Map? options}) { var subscribe = msg.Subscribe(_nextID, topic, options: options); var completer = Completer(); - _subscribeRequests[subscribe.requestID] = SubscribeRequest(completer, endpoint); + _subscribeRequests[subscribe.requestID] = SubscribeRequest(completer, eventHandler); _baseSession.send(_wampSession.sendMessage(subscribe)); return completer.future;