Skip to content

Commit 7caeff7

Browse files
committed
Changes to connect and disconnect methods
1 parent 27f27cf commit 7caeff7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ compile 'com.smartarmenia:dotnetcoresignalrclientjava:1.07'
2323

2424
#### Kotlin example
2525
```
26-
private val connection: HubConnection = WebSocketHubConnection("http(https)://hubaddress/")
26+
private val connection: HubConnection = WebSocketHubConnection("http(https)://hubaddress/", "Bearer your_token")
2727
```
2828

2929
```
30-
connection.connect("Bearer your_token")
30+
connection.connect()
3131
connection.addListener(listener)
3232
connection.subscribeToEvent(event, listener)
3333
```
@@ -41,11 +41,11 @@ connection.invoke("Method", params...)
4141
#### Java example
4242

4343
```
44-
final HubConnection connection = new WebSocketHubConnection("http(https)://hubaddress/");
44+
final HubConnection connection = new WebSocketHubConnection("http(https)://hubaddress/", "Bearer your_token");
4545
```
4646

4747
```
48-
connection.connect("Bearer your_token");
48+
connection.connect();
4949
connection.addListener(listener);
5050
connection.subscribeToEvent(event, listener);
5151
```

0 commit comments

Comments
 (0)