We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netty-socket.io:2.0.11 socket.io.client:4.7.5
public class EventChatLauncher { public static void main(String[] args) throws InterruptedException { Configuration config = new Configuration(); config.setHostname("localhost"); config.setPort(9092); config.setMaxFramePayloadLength(1048575); config.setMaxHttpContentLength(1048575); final SocketIOServer server = new SocketIOServer(config); server.addEventListener("chatevent", ChatObject.class, new DataListener<ChatObject>() { @Override public void onData(SocketIOClient client, ChatObject data, AckRequest ackRequest) { server.getBroadcastOperations().sendEvent("chatevent", data); byte[] bytes = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; server.getBroadcastOperations().sendEvent("broadcastMsg", bytes); client.sendEvent("msg", bytes); } }); server.start(); Thread.sleep(Integer.MAX_VALUE); server.stop(); } }
socket.on("msg", function (data) { console.log("msg", data); }); socket.on("broadcastMsg", function (data) { console.log("broadcastMsg", data); });
getBroadcastOperations().sendEvent
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version:
netty-socket.io:2.0.11
socket.io.client:4.7.5
backend code:
frontend code:
screenshot:
getBroadcastOperations().sendEvent
broadcast bytes,one client receive all bytes , another client receive zero bytesThe text was updated successfully, but these errors were encountered: