This repository has been archived by the owner on Sep 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
175b3b5
commit c2c8bcd
Showing
22 changed files
with
372 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
object Form7: TForm7 | ||
Left = 381 | ||
Height = 400 | ||
Top = 331 | ||
Width = 640 | ||
Caption = 'Liquidity pool' | ||
ClientHeight = 400 | ||
ClientWidth = 640 | ||
Position = poDesktopCenter | ||
ShowInTaskBar = stAlways | ||
LCLVersion = '2.2.4.0' | ||
object PageControl1: TPageControl | ||
Left = 0 | ||
Height = 400 | ||
Top = 0 | ||
Width = 640 | ||
ActivePage = TabConsole | ||
Align = alClient | ||
TabIndex = 1 | ||
TabOrder = 0 | ||
object TabTrade: TTabSheet | ||
Caption = 'Trade' | ||
end | ||
object TabConsole: TTabSheet | ||
Caption = 'Console' | ||
ClientHeight = 372 | ||
ClientWidth = 632 | ||
object Memo1: TMemo | ||
Left = 0 | ||
Height = 372 | ||
Top = 0 | ||
Width = 632 | ||
Align = alClient | ||
Color = clBlack | ||
Font.CharSet = ANSI_CHARSET | ||
Font.Color = clWhite | ||
Font.Name = 'Consolas' | ||
Font.Pitch = fpFixed | ||
Font.Quality = fqDraft | ||
ParentFont = False | ||
TabOrder = 0 | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{"version":1,"strings":[ | ||
{"hash":188446316,"name":"tform7.caption","sourcebytes":[76,105,113,117,105,100,105,116,121,32,112,111,111,108],"value":"Liquidity pool"}, | ||
{"hash":5998501,"name":"tform7.tabtrade.caption","sourcebytes":[84,114,97,100,101],"value":"Trade"}, | ||
{"hash":174433893,"name":"tform7.tabconsole.caption","sourcebytes":[67,111,110,115,111,108,101],"value":"Console"} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
unit formliqpool; | ||
|
||
{$mode ObjFPC}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls, | ||
fphttpclient; | ||
|
||
type | ||
|
||
{ TForm7 } | ||
|
||
TForm7 = class(TForm) | ||
Memo1: TMemo; | ||
PageControl1: TPageControl; | ||
TabConsole: TTabSheet; | ||
TabTrade: TTabSheet; | ||
private | ||
|
||
public | ||
|
||
end; | ||
|
||
Function PostMessageToHost(host:string;port:integer;message:string):string; | ||
|
||
var | ||
Form7: TForm7; | ||
|
||
IMPLEMENTATION | ||
|
||
Function PostMessageToHost(host:string;port:integer;message:string):string; | ||
var | ||
HTTPClient: TFPHTTPClient; | ||
Resultado : String = ''; | ||
RequestBodyStream: TStringStream; | ||
{ No need for the params string list } | ||
begin | ||
Result := ''; | ||
HTTPClient := TFPHTTPClient.Create(nil); | ||
RequestBodyStream:= TStringStream.Create(message, TEncoding.UTF8); | ||
HTTPClient.IOTimeout:=3000; // | ||
TRY | ||
HTTPClient.AllowRedirect := True; // <-- I always forget this LOL!! | ||
HTTPClient.RequestBody:= RequestBodyStream; | ||
Resultado := HTTPClient.Post('http://'+host+':'+Port.ToString); | ||
Except on E:Exception do | ||
Resultado := 'ERROR : '+E.Message; | ||
end; | ||
Result := Resultado; | ||
RequestBodyStream.Free; | ||
HTTPClient.Free; | ||
End; | ||
|
||
{$R *.lfm} | ||
|
||
END. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{"version":1,"strings":[ | ||
{"hash":21335,"name":"tform5.caption","sourcebytes":[76,111,103],"value":"Log"} | ||
{"hash":51962405,"name":"tform5.caption","sourcebytes":[76,111,103,32,45,32,78,111,115,111,108,105,116,101],"value":"Log - Nosolite"} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.