RTC Forums
May 06, 2024, 08:19:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Gateway and User/Group handling  (Read 4269 times)
x3mike
RTC Expired
*
Posts: 7


« on: June 20, 2015, 06:36:40 PM »

Is there any documentation on how the user and group handling within the gateway is done? I don't get it to work  Huh
I would like to split up the customers communication. An app can send data to the gateway and just the other apps of this customer should get the data streams.

thank you!
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: June 21, 2015, 05:25:42 PM »

Check the GateChatClient and GateChatServer example Projects in the Demos folder.

Basically, there are two ways to create User Groups on the Gateway, so the Gateway can dispatch data packages received from one User to multiple users ...

Option A: When a user logs in to the Gateway (BeforeUserLogin event), use the AddUserToChannel method to add Hosts (users streaming data) and Listeners (users receiving data streams) to "Channels" (which are basically Groups of users). To clean up, make sure to remove users from channels when users log out of the Gaetway (BeforeUserLogout) by using the RemoveUserFromChannel method. Check method description for more details on their use. For an example, check the GateChatClient and GateChatServer Projects.

Option B: For a user to be allowed to add another user to his Group (for Group message dispatching) the user needs to be added as a Friend by the recipient. Otherwise, the Gateway is going to reject the attempt of one user to add another user to his Group. Unless you disable the "friend check" feature on the Gateway, allowing anyone to add anyone else to their Group for receiving mesages (which I wouldn't recommend if the Gateway is accessible over the Internet).

Best Regards,
Danijel Tkalcec
Logged
x3mike
RTC Expired
*
Posts: 7


« Reply #2 on: June 21, 2015, 10:03:33 PM »

Thank you very much! Using channels works fine.
Is it possible to bind the TRtcHttpServer to specific IPs and/or Ports? Leaving the ServerAddr causes the HttpServer to listen to all network cards.

Best regards,
Michael
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: June 22, 2015, 09:34:56 AM »

You can bind the Server Listener to a specific Network Card by entering its IP address into the ServerAddr property on the TRtcHttpServer component. You can also implement a custom filter in the BeforeUserLogin event using the Sender:TRtcConnection parameter (raise an Exception if the user is not allowed to log in to the Gateway).

Best Regards,
Danijel Tkalcec
Logged
x3mike
RTC Expired
*
Posts: 7


« Reply #4 on: June 22, 2015, 03:26:17 PM »

I know about the single IP and all IPs in the ServerAddr property. My Webserver is bound to several networks (internal, external, testing, etc.). I would like to just bind the IPs of internal and testing.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #5 on: June 22, 2015, 04:21:08 PM »

Each TRtcHttpServer component uses a single TCP/IP listening socket, which can either be bound to all Newtork Addapters by leaving the ServerAddr property empty, or to one specific Network Addapter by entering that Network Addapters IP Address into the ServerAddr property.

If you want your Server Application to be listening on multiple Nertwork Addapters, but NOT on all of them, then you will have to use a separate TRtcHttpServer component for each Network Addapter. To link Server components together for use with TRtcDataProvider, TRtcServerModule and TRtcGateway components, use the TRtcDualDataServerLink component.

Best Regards,
Danijel Tkalcec
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.024 seconds with 17 queries.