chore(release): prepare release socket.io-client-2.1.0
This commit is contained in:
52
History.md
52
History.md
@@ -1,4 +1,56 @@
|
||||
|
||||
2.1.0 / 2022-07-10
|
||||
==================
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* ensure randomizationFactor is always between 0 and 1 ([0cbf01e](https://github.com/socketio/socket.io-client-java/commit/0cbf01eb2501b3098eacd22594966a719b20c31e))
|
||||
* prevent socket from reconnecting after middleware failure ([95ecf22](https://github.com/socketio/socket.io-client-java/commit/95ecf222d25de390d8c0f2ffade37b608cf448eb))
|
||||
* increase the readTimeout value of the default OkHttpClient ([fb531fa](https://github.com/socketio/engine.io-client-java/commit/fb531fab30968a4b65a402c81f37e92dd5671f33)) (from `engine.io-client`)
|
||||
|
||||
### Features
|
||||
|
||||
* emit with timeout ([fca3b95](https://github.com/socketio/socket.io-client-java/commit/fca3b9507d5bc79d3c41ab6e119efccd23669ca6))
|
||||
|
||||
This feature allows to send a packet and expect an acknowledgement from the server within the given delay.
|
||||
|
||||
Syntax:
|
||||
|
||||
```java
|
||||
socket.emit("hello", "world", new AckWithTimeout(5000) {
|
||||
@Override
|
||||
public void onTimeout() {
|
||||
// ...
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
* implement catch-all listeners ([c7d50b8](https://github.com/socketio/socket.io-client-java/commit/c7d50b8ae9787e9ebdff50aa5d36f88433fc50b9))
|
||||
|
||||
Syntax:
|
||||
|
||||
```java
|
||||
socket.onAnyIncoming(new Emitter.Listener() {
|
||||
@Override
|
||||
public void call(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
|
||||
socket.onAnyOutgoing(new Emitter.Listener() {
|
||||
@Override
|
||||
public void call(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
2.0.1 / 2021-04-27
|
||||
==================
|
||||
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.socket</groupId>
|
||||
<artifactId>socket.io-client</artifactId>
|
||||
<version>2.0.2-SNAPSHOT</version>
|
||||
<version>2.1.0</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>socket.io-client</name>
|
||||
<description>Socket.IO Client Library for Java</description>
|
||||
@@ -30,7 +30,7 @@
|
||||
<url>https://github.com/socketio/socket.io-client-java</url>
|
||||
<connection>scm:git:https://github.com/socketio/socket.io-client-java.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/socketio/socket.io-client-java.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
<tag>socket.io-client-2.1.0</tag>
|
||||
</scm>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -1,4 +1,57 @@
|
||||
|
||||
## [2.1.0](https://github.com/socketio/socket.io-client-java/compare/socket.io-client-2.0.1...socket.io-client-2.1.0) (2022-07-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* ensure randomizationFactor is always between 0 and 1 ([0cbf01e](https://github.com/socketio/socket.io-client-java/commit/0cbf01eb2501b3098eacd22594966a719b20c31e))
|
||||
* prevent socket from reconnecting after middleware failure ([95ecf22](https://github.com/socketio/socket.io-client-java/commit/95ecf222d25de390d8c0f2ffade37b608cf448eb))
|
||||
* increase the readTimeout value of the default OkHttpClient ([fb531fa](https://github.com/socketio/engine.io-client-java/commit/fb531fab30968a4b65a402c81f37e92dd5671f33)) (from `engine.io-client`)
|
||||
|
||||
### Features
|
||||
|
||||
* emit with timeout ([fca3b95](https://github.com/socketio/socket.io-client-java/commit/fca3b9507d5bc79d3c41ab6e119efccd23669ca6))
|
||||
|
||||
This feature allows to send a packet and expect an acknowledgement from the server within the given delay.
|
||||
|
||||
Syntax:
|
||||
|
||||
```java
|
||||
socket.emit("hello", "world", new AckWithTimeout(5000) {
|
||||
@Override
|
||||
public void onTimeout() {
|
||||
// ...
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
* implement catch-all listeners ([c7d50b8](https://github.com/socketio/socket.io-client-java/commit/c7d50b8ae9787e9ebdff50aa5d36f88433fc50b9))
|
||||
|
||||
Syntax:
|
||||
|
||||
```java
|
||||
socket.onAnyIncoming(new Emitter.Listener() {
|
||||
@Override
|
||||
public void call(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
|
||||
socket.onAnyOutgoing(new Emitter.Listener() {
|
||||
@Override
|
||||
public void call(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
|
||||
## [2.0.1](https://github.com/socketio/socket.io-client-java/compare/socket.io-client-2.0.0...socket.io-client-2.0.1) (2021-04-27)
|
||||
|
||||
|
||||
|
||||
@@ -146,3 +146,21 @@ socket.on("hello", args -> {
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## With timeout
|
||||
|
||||
Starting with version `2.1.0`, you can now assign a timeout to each emit:
|
||||
|
||||
```java
|
||||
socket.emit("hello", "world", new AckWithTimeout(5000) {
|
||||
@Override
|
||||
public void onTimeout() {
|
||||
// ...
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@ Add the following dependency to your `pom.xml`.
|
||||
<dependency>
|
||||
<groupId>io.socket</groupId>
|
||||
<artifactId>socket.io-client</artifactId>
|
||||
<version>2.0.1</version>
|
||||
<version>2.1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
@@ -26,7 +26,7 @@ Add the following dependency to your `pom.xml`.
|
||||
Add it as a gradle dependency for Android Studio, in `build.gradle`:
|
||||
|
||||
```groovy
|
||||
implementation ('io.socket:socket.io-client:2.0.1') {
|
||||
implementation ('io.socket:socket.io-client:2.1.0') {
|
||||
// excluding org.json which is provided by Android
|
||||
exclude group: 'org.json', module: 'json'
|
||||
}
|
||||
@@ -36,6 +36,7 @@ implementation ('io.socket:socket.io-client:2.0.1') {
|
||||
|
||||
| `socket.io-client` | `engine.io-client` | `okhttp` |
|
||||
|-----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
|
||||
| `2.1.0` ([diff](https://github.com/socketio/socket.io-client-java/compare/socket.io-client-2.0.1...socket.io-client-2.1.0)) | `2.1.0` ([diff](https://github.com/socketio/engine.io-client-java/compare/engine.io-client-2.0.0...engine.io-client-2.1.0)) | `3.12.12` |
|
||||
| `2.0.1` ([diff](https://github.com/socketio/socket.io-client-java/compare/socket.io-client-2.0.0...socket.io-client-2.0.1)) | `2.0.0` | `3.12.12` |
|
||||
| `2.0.0` ([diff](https://github.com/socketio/socket.io-client-java/compare/socket.io-client-1.0.1...socket.io-client-2.0.0)) | `2.0.0` ([diff](https://github.com/socketio/engine.io-client-java/compare/engine.io-client-1.0.1...engine.io-client-2.0.0)) | `3.12.12` |
|
||||
| `1.0.1` ([diff](https://github.com/socketio/socket.io-client-java/compare/socket.io-client-1.0.0...socket.io-client-1.0.1)) | `1.0.1` ([diff](https://github.com/socketio/engine.io-client-java/compare/engine.io-client-1.0.0...engine.io-client-1.0.1)) | `3.12.12` ([changelog](https://square.github.io/okhttp/changelogs/changelog_3x/#version-31212)) |
|
||||
|
||||
@@ -69,3 +69,27 @@ Removes all listeners (for any event).
|
||||
```java
|
||||
socket.off();
|
||||
```
|
||||
|
||||
## Catch-all listeners
|
||||
|
||||
### For incoming packets
|
||||
|
||||
```java
|
||||
socket.onAnyIncoming(new Emitter.Listener() {
|
||||
@Override
|
||||
public void call(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### For outgoing packets
|
||||
|
||||
```java
|
||||
socket.onAnyOutgoing(new Emitter.Listener() {
|
||||
@Override
|
||||
public void call(Object... args) {
|
||||
// ...
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user