Skip to content

2.1.0

Compare
Choose a tag to compare
@darrachequesne darrachequesne released this 10 Jul 21:35
· 9 commits to main since this release
abe22c3

Bug Fixes

  • ensure randomizationFactor is always between 0 and 1 (0cbf01e)
  • prevent socket from reconnecting after middleware failure (95ecf22)
  • increase the readTimeout value of the default OkHttpClient (fb531fa) (from engine.io-client)

Features

This feature allows to send a packet and expect an acknowledgement from the server within the given delay.

Syntax:

socket.emit("hello", "world", new AckWithTimeout(5000) {
    @Override
    public void onTimeout() {
        // ...
    }

    @Override
    public void onSuccess(Object... args) {
        // ...
    }
});
  • implement catch-all listeners (c7d50b8)

Syntax:

socket.onAnyIncoming(new Emitter.Listener() {
    @Override
    public void call(Object... args) {
        // ...
    }
});

socket.onAnyOutgoing(new Emitter.Listener() {
    @Override
    public void call(Object... args) {
        // ...
    }
});

Links