In this demo we are building a client application that will be able to receive any file it request from a site, all of this with the Client components from RealThinClient.
Basically we are going to:
- Create a new Delphi project and add some controls
- Define events to process our request.
- Compile and run our project.
In this lesson, we’ll be building a solution with a Server and a Client. This first lesson with a Client side made with RealThinClient Components is simple but shows the concept behind a client – server system that could be the base for a larger application. We’ll be using Remote Functions to accomplish this task.
This Post has three sections.
- The Server.
- The Client.
- Make it work.
This demo continues over Demo 3 (Sending small files). Now, we are going to make a webserver that is able to send files no matter their size.
We must be careful with our server’s memory, we may have a really big file in our server and we don’t want to use all of it.
At our first two examples we have been sending all of our content at once on the OnCheckRequest and OnDataReceived events of our RtcDataProvider components.
By this moment, we have been sending content generated by our Server. Now we are going to see how to send small files from a folder that resides inside our Server’s running directory. We’ll do it this way because with this approach we can control what files can be accessed from the Server.
We’ll use some functions to secure our Server and check that the content (file size in this case) is small enough to send.
In the next lesson we’ll see how to deal with bigger file sizes.
We’ll need the code of our Lesson 2b post which you can download at Code For RealThinClient SDK Lesson 2b. Continue reading
Now that we have seen how to Create a Web Server and how to Send Dynamically Generated Content, we are going to see how to accept Query Parameters.
We are going to make some small changes to our previous code (Code for Demo Sending Dynamically Generated Content) to accept request’s query parameters.
When we coded our Dynamically Generated Content we give no option to the user to decide what Square values the system will return, so now, we are going to give the user the choice to:
- Select the starting number of the Square values.
- Select the ending number of the Square values.
Now we’re going to create an application to send Dynamically Generated Content. We’ll use as base the RealThinClient SDK – Your First Web Server project. You can download the source code to work with.
In this lesson, you’ll see how two data providers can work together and how you can use multiple Write calls to send complex content out. Continue reading
We’re going to build a Web Server with RealThinClient SDK in Delphi.
Basically we are going to:
- Create a Project
- Add two RealThinClient SDK components (RtcHTTPServer and RtcDataProvider)
- Configure three events.
- Check that our Web Server is working.
We’ll be working the code sections in two formats, one using the with clause and another without it.
First we will install the RealThinClient SDK and then the RealThinClient Portal components.
The install process is the same as for other components in the RAD Studio products. First, we unpack the downloaded files (you can download the files for the RTC SDK stater edition HERE, remember to choose the right version according to your RAD Studio version.)