Creating the Server application (Communication Filters Tutorial)

From RAD Studio
Jump to: navigation, search

Go Up to Tutorial: Delphi DataSnap Communication Filters


Creating the Server application

1. Open RAD Studio.

2. Select File > New > Other.

3. From the DataSnap Server node in the left column, select DataSnap Server and press OK.

4. Specify the type of application:

  1. Select Windows VCL Application and press Next.
  2. Keep the default values (TCP/IP Protocol and enabling the generation of Sample Methods) and press Next.
  3. Press Test Port to verify whether Port 211 is open, and then press Next.
  4. Keep the default value selected--TComponent and press Finish.
  5. Press the Save All button from the menu bar and save all the items in the same folder.
For ease of use, name the first unit FormServerUnit.pas and the project group--FiltersGroup.

5. Select the ServerContainerUnit2.pas from the project tree in the right and go to its Design page.

Cf1.png

  • Select the DSTCPServerTransport1 component, then its Filters property, which you can find in the left.
The Editing DSTCPServerTransport1.Filters window opens.
Cf2.png

  • Click the Add New button and select the newly added transport filter. Look into the Object Inspector and change its FilterId property to ZLibCompression. Exit the Editing DSTCPServerTransport1.Filters window. The server is now ready.
Cf3.png

6. Run the server and minimize its window.

Next

See Also