Skip to content

Commit 6f4ea01

Browse files
committed
docs: fix README
1 parent 33cb089 commit 6f4ea01

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# RxSocketClient
22

3-
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/codeestX/RxSocketClient/pulls)[![API](https://img.shields.io/badge/API-20%2B-brightgreen.svg)](https://android-arsenal.com/api?level=20)[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
3+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/codeestX/RxSocketClient/pulls) [![API](https://img.shields.io/badge/API-20%2B-brightgreen.svg)](https://android-arsenal.com/api?level=20) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44

5-
RxSocketClient, Reactive Socket APIs for Android, Java and Kotlin, powered by RxJava2
5+
RxSocketClient, Reactive Socket APIs for Android, Java and Kotlin, powered by RxJava2
66
RxSocketClient,支持Android,Java和Kotlin的响应式Socket APIs封装,基于RxJava2
77

88
RxJava2 Version: 2.1.1
99

1010
# Usage
1111

1212
### init
13-
```
13+
```java
1414
SocketClient mClient = RxSocketClient
1515
.create(new SocketConfig.Builder()
1616
.setIp(IP)
@@ -38,8 +38,9 @@ SocketClient mClient = RxSocketClient
3838
| Tail | Optional | appending bytes at last when sending data, not included heartbeat |
3939

4040
### connect
41-
```
41+
```java
4242
Disposable ref = mClient.connect()
43+
... // anything else what you can do with RxJava
4344
.observeOn(AndroidSchedulers.mainThread())
4445
.subscribe(new SocketSubscriber() {
4546
@Override
@@ -61,14 +62,14 @@ Disposable ref = mClient.connect()
6162
```
6263

6364
### disconnect
64-
```
65+
```java
6566
mClient.disconnect();
6667
//or
6768
ref.dispose();
6869
```
6970

7071
### sendData
71-
```
72+
```java
7273
mClient.sendData(bytes);
7374
//or
7475
mClient.sendData(string);

0 commit comments

Comments
 (0)