Download Latest Version 2.1.2 source code.tar.gz (179.3 kB)
Email in envelope

Get an email when there's a new version of Socket.IO-client Java

Home / socket.io-client-2.1.0
Name Modified Size InfoDownloads / Week
Parent folder
2.1.0.tar.gz 2022-07-10 176.6 kB
2.1.0.zip 2022-07-10 206.5 kB
README.md 2022-07-10 1.9 kB
Totals: 3 Items   385.0 kB 0

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:

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

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

Syntax:

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

socket.onAnyOutgoing(new Emitter.Listener() {
    @Override
    public void call(Object... args) {
        // ...
    }
});
Source: README.md, updated 2022-07-10