RTC Forums
July 14, 2020, 01:41:26 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: RtcHttpClient in Listen mode  (Read 148 times)
twinsoft
RTC License
***
Posts: 9


« on: June 04, 2020, 07:11:59 PM »

Hi, we would like to know if it is possible to set RtcHttpClient in listen mode. After successfull connection, listen to incoming messages, without sending something first. We cannot use DelayedCalls as the comunication is between 2 RtcHttpClients.

Stefanos
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1821


« Reply #1 on: June 04, 2020, 07:14:21 PM »

There is no "listen mode" for Clients. Servers listen for incoming connections, while Clients connect to Servers. That is how TCP/IP works in general.

Best Regards,
Danijel Tkalcec
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1821


« Reply #2 on: June 04, 2020, 07:35:58 PM »

You can use WebSockets with TRtcHttpClient and TRtcHttpServer components if you need message-based two-way communication between HTTP Clients and a HTTP Server. There are two example projects available, both can be found in the "Examples" folder, under sub-folders WebSockClient and WebSockServer.

Best Regards,
Danijel Tkalcec
Logged
twinsoft
RTC License
***
Posts: 9


« Reply #3 on: June 05, 2020, 08:44:13 AM »

Hi, actualy we where looking at RtcMessageClient/RtcMessageServer and possibly a custom transport based on simple TCPClient. We cannot find an example or information on how to use these components and in the forum there are only a few topics on them. Can you provide detailed information on how to use them, and some demo code ?

Stefanos
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1821


« Reply #4 on: June 05, 2020, 12:34:10 PM »

TRtcMessageClient and TRtcMessageServer are wrappers for using blocking, message-driven, stream-based third-party transports like NexusDB connection components, with higher-level RTC components. TRtcMessageClient and TRtcMessageServer components do NOT implement a communication protocol and are NOT meant to be used on-their-own, unless you plan to implement your own custom transports for use with higher-level RTC components.

If that is what you wanted (implement your own custom transports for RTC components) and you need an example, then check NexusDB transport plugins in the "LibPlugins" folder ("nxRtcClient.pas" and "nxRTCServer.pas" units), but I can NOT provide you with "detailed information" on how to implement a custom transport. That's way too low-level. Sorry.

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.023 seconds with 17 queries.