Closed Tracy0725 closed 3 years ago
I think you are looking for the path
option:
IO.Options options = IO.Options.builder()
.setPath("/MySocket/")
.build();
Socket socket = IO.socket(URI.create("https://example.com"), options);
Documentation: https://socketio.github.io/socket.io-client-java/initialization.html#path
I think you are looking for the
path
option:IO.Options options = IO.Options.builder() .setPath("/MySocket/") .build(); Socket socket = IO.socket(URI.create("https://example.com"), options);
Documentation: https://socketio.github.io/socket.io-client-java/initialization.html#path
Yes, thanks! and Attach the method in server. In client:
IO.Options options = new IO.Options();
options.path = "/custom.socket.io";
In server:
com.corundumstudio.socketio.Configuration config = new com.corundumstudio.socketio.Configuration();
config.setContext("/custom.socket.io");
I want to customize the default URL such as /MySocket/?EIO=...