RTC Forums
April 28, 2024, 04:30:00 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Send data to user group  (Read 4118 times)
byte
Newbie
*
Posts: 4


« on: September 20, 2016, 10:25:37 AM »

I need to send data using sendbytes method to all users in the group but group is not created by me!
Is there any way to do this with one sendbytes method call?
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: September 20, 2016, 10:29:01 AM »

Gate Client can ONLY send data to Groups created and managed by that Gate Client. Any Client that needs to send data to a Group has to create that Group and add all users to its Group. Also, for any Client to be allowed to add any other Client to his Group, the Client creating the Group has to send a direct message to all the Clients he wants to add, wait for each of these Clients to add the Client as a Friend, only then can the Client add another Client to his Group.

Best Regards,
Danijel Tkalcec
Logged
byte
Newbie
*
Posts: 4


« Reply #2 on: September 20, 2016, 10:34:23 AM »

well...
Is there any method to get all connected user id numbers from client?
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: September 20, 2016, 10:37:48 AM »

The information about IDs of all logged in Clients is confidential. Would the Gateway provide a method to any Client to get a list of all other Clients, it would become vulnerable to all sorts of attacks.

The only alternative to manually creating Groups by Clients is to use the "AddUserToGroup" or "AddUserToChannel" methods on the Gateway for any Clients which the Gateway "knows" to be trustworthy and wants to automatically allow them to send data to one or more other connected Clients, without requesting special permissions and manually creating Groups. Check the Gate Chat example to see how that can be done.

P.S. Imagine a scenarion where the Gateway is accessible over the Internet and has to serve hundreds or even thousands of Clients, all exchanging data. Then, a malicious person decides to start a few Clients, connect them to the Gateway, request a complete list of all the other connected Clients, add all those Clients to his Group without asking for any permissions and then starts sending data to all of them through the Gateway. When those malicious Clients start sending data through the Gateway to all other Clients, the Gateway would become unusable for any normal data exchange. Would the Gateway allow this, it would become the prfect target for hackers.

Best Regards,
Danijel Tkalcec
Logged
byte
Newbie
*
Posts: 4


« Reply #4 on: September 20, 2016, 12:14:21 PM »

Yes you are right.
I've solved over group creator user via custom message.
Thank you.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 17 queries.