A new version of engine.io wrapper based on netty.
Add repository:
repositories {
maven {
name 'jitpack'
url 'https://www.jitpack.io'
}
}
The add dependencies:
dependencies {
implementation 'com.github.Apisium:netty-engine.io:1.1'
implementation 'io.netty:netty-all:4.1.85.Final'
implementation 'io.socket:engine.io-server:6.2.1'
testImplementation ('io.socket:socket.io-server:4.0.1') {
exclude group: 'io.socket', module: 'engine.io-server' // Avoid old engine.io
}
}
import cn.apisium.netty.engineio.EngineIoHandler;
import io.socket.engineio.server.EngineIoServer;
import io.socket.socketio.server.SocketIoServer;
public class Main {
public static void main(String[] args) {
EngineIoServer engineIoServer = new EngineIoServer();
SocketIoServer socketIoServer = new SocketIoServer(engineIoServer);
Channel ch; // ch = ctx.channel();
ch.pipeline().addLast(new EngineIoHandler(engineIoServer));
}
}
Shirasawa