Skip to content

Commit f5141e3

Browse files
committed
More cleanign
tabs to space / added roadmap to readme
1 parent 954866d commit f5141e3

File tree

7 files changed

+403
-380
lines changed

7 files changed

+403
-380
lines changed

README.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ the same time.
7373

7474
## Running VTXServ
7575

76-
Type vtxserv from the command line.
76+
Type vtxserv from the command line. Once the server is running you can enter
77+
commands like:
7778

7879
START ALL : start up the web server, websocket server, and the bridge process.
7980
The bridge process redirects StdIn/StdOut back and forth between the 'node'
@@ -103,3 +104,20 @@ Sample node software is in the node directory. Actual BBS software is not in the
103104
scope of this project, but feel free to tinker, or retrofit existing packages
104105
to work with VTX.
105106

107+
## Roadmap
108+
109+
Stablize server software - fully crashproof and able to always terminate phantom
110+
nodes.
111+
112+
Add additional tool to server console for convert SVG files to Base64 for use
113+
in node software. Possibly remove these tools to separate command line utilities.
114+
115+
Clean up demo node software. Develop ncurses compatible functions and procedures.
116+
117+
Add new escape sequences to define clickable hotspots for sending a key or string
118+
to the server. Additionally, define hotspot for external URLs links that open in
119+
an new page.
120+
121+
Investigate ability for websocket server to accept non-'user' connections from
122+
other VTX servers for passing private network information like mail or echo-style
123+
messages.

bclasses.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ TBThread = class(TThread)
3838
fSyncLock: TCriticalSection;
3939
procedure Synchronize(AMethod: TThreadMethod);
4040
public
41-
constructor Create(CreateSuspended: Boolean);
41+
constructor Create(CreateSuspended: Boolean);
4242
destructor Destroy; override;
4343
end;
4444

customserver2.pas

+34-34
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ interface
3131
// Sockets,
3232
ssl_openssl,
3333
BClasses,
34-
syncobjs;
34+
syncobjs;
3535

3636
type
3737
TCustomServer = class;
@@ -41,24 +41,24 @@ TCustomConnection = class;
4141
TTCPCustomConnectionSocket = class(TTCPBlockSocket)
4242

4343
protected
44-
fConnection : TCustomConnection;
45-
fCurrentStatusReason : THookSocketReason;
46-
fCurrentStatusValue : string;
47-
fOnSyncStatus : THookSocketStatus;
44+
fConnection : TCustomConnection;
45+
fCurrentStatusReason : THookSocketReason;
46+
fCurrentStatusValue : string;
47+
fOnSyncStatus : THookSocketStatus;
4848

49-
procedure DoOnStatus(Sender: TObject; Reason: THookSocketReason; const Value: String);
50-
procedure SyncOnStatus;
49+
procedure DoOnStatus(Sender: TObject; Reason: THookSocketReason; const Value: String);
50+
procedure SyncOnStatus;
5151

5252
public
53-
constructor Create;
53+
constructor Create;
5454

55-
destructor Destroy; override;
55+
destructor Destroy; override;
5656

5757
{:Owner (@link(TCustomConnection))}
58-
property Connection: TCustomConnection read fConnection;
58+
property Connection: TCustomConnection read fConnection;
5959

6060
{:Socket status event (synchronized to main thread)}
61-
property OnSyncStatus: THookSocketStatus read fOnSyncStatus write fOnSyncStatus;
61+
property OnSyncStatus: THookSocketStatus read fOnSyncStatus write fOnSyncStatus;
6262
end;
6363

6464

@@ -75,50 +75,50 @@ TCustomConnection = class(TBThread)
7575
private
7676

7777
protected
78-
fIndex : integer;
79-
fParent : TCustomServer;
80-
fSocket : TTCPCustomConnectionSocket;
81-
fSSL : boolean;
82-
procedure AfterConnectionExecute; virtual;
83-
function BeforeExecuteConnection: boolean; virtual;
84-
procedure ExecuteConnection; virtual;
85-
function GetIsTerminated: boolean;
78+
fIndex : integer;
79+
fParent : TCustomServer;
80+
fSocket : TTCPCustomConnectionSocket;
81+
fSSL : boolean;
82+
procedure AfterConnectionExecute; virtual;
83+
function BeforeExecuteConnection: boolean; virtual;
84+
procedure ExecuteConnection; virtual;
85+
function GetIsTerminated: boolean;
8686

8787
public
88-
constructor Create(aSocket: TTCPCustomConnectionSocket); virtual;
89-
destructor Destroy; override;
88+
constructor Create(aSocket: TTCPCustomConnectionSocket); virtual;
89+
destructor Destroy; override;
9090

9191
{:Thread execute method}
92-
procedure Execute; override;
92+
procedure Execute; override;
9393

9494
{:Thread resume method}
95-
procedure Start;
95+
procedure Start;
9696
{:Thread suspend method}
97-
procedure Stop;
97+
procedure Stop;
9898

9999
{:Temination procedure
100100
One should call this procedure to terminate thread,
101101
it internally calls Terminate, but can be overloaded,
102102
and can be used for clean um }
103-
procedure TerminateThread; virtual;
103+
procedure TerminateThread; virtual;
104104

105105
{:@Connection index.
106106
Automatically generated. }
107-
property Index: integer read fIndex;
107+
property Index: integer read fIndex;
108108

109109
{:@True if thread is not terminated and @link(Socket) exists}
110-
property IsTerminated: boolean read GetIsTerminated;
110+
property IsTerminated: boolean read GetIsTerminated;
111111

112112
{:@Connection parent
113113
If client connection, this property is always nil, if server
114114
connection, this property is @link(TCustomServer) that created this connection }
115-
property Parent: TCustomServer read fParent;
115+
property Parent: TCustomServer read fParent;
116116

117117
{:@Connection socket}
118-
property Socket: TTCPCustomConnectionSocket read fSocket;
118+
property Socket: TTCPCustomConnectionSocket read fSocket;
119119

120120
{:Whether SSL is used}
121-
property SSL: boolean read fSSL write fSSL;
121+
property SSL: boolean read fSSL write fSSL;
122122
end;
123123

124124

@@ -243,7 +243,7 @@ TCustomServer = class(TBThread)
243243
This method should be called instead of Terminate to terminate thread,
244244
it internally calls Terminate, but can be overloaded,
245245
and can be used for data clean up
246-
}
246+
}
247247
procedure TerminateThread; virtual;
248248

249249

@@ -704,7 +704,7 @@ procedure TTCPCustomConnectionSocket.DoOnStatus(Sender: TObject; Reason: THookSo
704704
fCurrentStatusReason := Reason;
705705
fCurrentStatusValue := value;
706706
fConnection.Synchronize(SyncOnStatus);
707-
707+
708708
{
709709
if (fCurrentStatusReason = HR_Error) and (LastError = WSAECONNRESET) then
710710
fConnection.Terminate;
@@ -744,7 +744,7 @@ destructor TCustomConnection.Destroy;
744744
fSocket.OnStatus := nil;
745745
fSocket.Free;
746746
end;
747-
747+
748748
inherited Destroy;
749749
end;
750750

@@ -774,7 +774,7 @@ procedure TCustomConnection.Stop;
774774
procedure TCustomConnection.TerminateThread;
775775
begin
776776
if (terminated) then exit;
777-
777+
778778
Socket.OnSyncStatus := nil;
779779
Socket.OnStatus := nil;
780780
Terminate;

0 commit comments

Comments
 (0)