We need to add a simple communication layer to an old Delphi 6 app to allow it to exchange messages and files across a local network. No security or login required in this task, since we will add that later when we incorporate code from this tast.
So perhaps we have Computer 1 running this Delphi app,
and Computer 2 is running another instance of the same app. One POSTs text strings or binaries images loaded each into a TStream then uploaded.
We do not want to track connections, so we want to implement our own very simple REST later for message passing. Each instance of the app can listen on a specified port number and receive messages.
Messages can either be a string or a TStream that may contain a file or data up to 25mb in size.
A test project is included that already passes messages by GET protocol using a threaded idHTTPClient. We want all messages to be sent by POST protocol instead. We still want to use our threaded client for performance, so we need to improve the functionality of TCallApiThread or make a separate TThread class for POSTing changes.
Must compile and build and run in Delphi 6 Professional.
Must work with Internet Direct (Indy) components version 10.1.6.
Source code must be released and conirmed working before milestone will be released.
DO NOT ASK FOR UPFRONT MILESTONE OR DEPOSIT. FUNDS WILL BE PUT IN THE MILESONE SYSTEM ON FREELANCER AND RELEASED ONCE SOFTWARE IS DELIVERED AND VERIFIED.
PHASE 1 OF REMOTE CONTROL TOOL
1) Implement the following empty functions in the test project:
procedure SendMessage(sMsg, sDestIP : string; iPort : integer);
procedure SendStream(M : TStream; sDestIP : string; iPort : integer);
2) Switch existing buttons (Send and Image) to use these functions to POST multiple string messages and POST multiple files between machines.
3) Show the received text in the memo box, and show a received JPG in the TImage control.
We recommend that you POST to different "URL"s on the receiving server to indicate which type of message is coming in.
PHASE 2 OF TOOL
We are interested in adding some additional message types and commands to the REST layer if phase 1 works correctly.