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
first of all, I am not good at English, please let me konw if you don't know what i say.
I modifed the example of BinaryEventLauncher as below, just to Let All connected client can see the picture if some one upload picture:
server.addEventListener("msg", byte[].class, new DataListener<byte[]>() { @Override public void onData(SocketIOClient client, byte[] data, AckRequest ackRequest) { server.getBroadcastOperations().sendEvent("msg", data); //client.sendEvent("msg", data); } });
but It doesn't work, not all connected client can see the upload picture, maybe something wrong?
I have to use the for loop to make sure it work as i want:
server.addEventListener("msg", byte[].class, new DataListener<byte[]>() { @Override public void onData(SocketIOClient client, byte[] data, AckRequest ackRequest) { for(SocketIOClient socketIOClient:server.getAllClients()){ socketIOClient.sendEvent("msg", data); } //server.getBroadcastOperations().sendEvent("msg", data); //client.sendEvent("msg", data); } });
please tell me why? do i have to use the for loop instead of BroadcastOperations?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
first of all, I am not good at English, please let me konw if you don't know what i say.
I modifed the example of BinaryEventLauncher as below, just to Let All connected client can see the picture if some one upload picture:
but It doesn't work, not all connected client can see the upload picture, maybe something wrong?
I have to use the for loop to make sure it work as i want:
please tell me why? do i have to use the for loop instead of BroadcastOperations?
The text was updated successfully, but these errors were encountered: