U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » how to broadcast in AsyncWebSocket?
how to broadcast in AsyncWebSocket? [message #49704] Sun, 08 April 2018 15:11 Go to next message
akebee is currently offline  akebee
Messages: 90
Registered: August 2011
Location: China
Member
I can "t quite understand the reference/AsyncWebSocket
i dont know how to broadcast to clients in this example


it seems that the
Array<Worker> worker
represent connections.
so the broadcast is
		for(int i = worker.GetCount() - 1; i >= 0; i--)
		{
			Worker& w = worker[i];
			w.ws.SendText("broadcast........");
		}

[Updated on: Sun, 08 April 2018 16:48]

Report message to a moderator

Re: how to broadcast in AsyncWebSocket? [message #49724 is a reply to message #49704] Fri, 13 April 2018 15:08 Go to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
I guess yes, this cound be correct.

Thinks are quite complicated, but I believe that as long as you keep calling "Do" after wait, it should work.

Mirek
Previous Topic: HttpRequest ignores server errors
Next Topic: ValueGet in Core/Rpc/Rpc.h
Goto Forum:
  


Current Time: Sat Apr 25 18:48:14 GMT+2 2026

Total time taken to generate the page: 0.00602 seconds