Skip to content
Snippets Groups Projects
Commit 8044cf9b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add max concurrent connections edit box to web cfg dialog

parent 065ed30e
No related branches found
No related tags found
No related merge requests found
Pipeline #7304 passed
......@@ -61,6 +61,7 @@ void __fastcall TWebCfgDlg::FormShow(TObject *Sender)
else
MaxClientsEdit->Text=AnsiString((int)MainForm->web_startup.max_clients);
MaxInactivityEdit->Text = duration_to_str(MainForm->web_startup.max_inactivity, str, sizeof str);
MaxConConEdit->Text = AnsiString((int)MainForm->web_startup.max_concurrent_connections);
PortEdit->Text=AnsiString((int)MainForm->web_startup.port);
TlsPortEdit->Text=AnsiString((int)MainForm->web_startup.tls_port);
AutoStartCheckBox->Checked=MainForm->WebAutoStart;
......@@ -115,6 +116,7 @@ void __fastcall TWebCfgDlg::OKBtnClick(TObject *Sender)
MainForm->web_startup.tls_interfaces = strListSplitCopy(NULL, TlsInterfaceEdit->Text.c_str(), ",");
MainForm->web_startup.max_clients=MaxClientsEdit->Text.ToIntDef(10);
MainForm->web_startup.max_inactivity = parse_duration(MaxInactivityEdit->Text.c_str());
MainForm->web_startup.max_concurrent_connections = MaxConConEdit->Text.ToIntDef(0);
MainForm->web_startup.port=PortEdit->Text.ToIntDef(IPPORT_HTTP);
MainForm->web_startup.tls_port=TlsPortEdit->Text.ToIntDef(IPPORT_HTTPS);
MainForm->WebAutoStart=AutoStartCheckBox->Checked;
......
......@@ -3,8 +3,8 @@ object WebCfgDlg: TWebCfgDlg
Top = 332
BorderStyle = bsDialog
Caption = 'Web Server Configuration'
ClientHeight = 245
ClientWidth = 286
ClientHeight = 283
ClientWidth = 330
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
......@@ -16,65 +16,65 @@ object WebCfgDlg: TWebCfgDlg
ShowHint = True
OnShow = FormShow
DesignSize = (
286
245)
330
283)
PixelsPerInch = 96
TextHeight = 13
TextHeight = 15
object PageControl: TPageControl
Left = 3
Top = 3
Width = 278
Height = 199
ActivePage = SoundTabSheet
TabIndex = 5
Width = 321
Height = 230
ActivePage = HttpTabSheet
TabIndex = 2
TabOrder = 0
object GeneralTabSheet: TTabSheet
Caption = 'General'
object MaxClientesLabel: TLabel
Left = 7
Top = 88
Width = 78
Height = 19
Left = 8
Top = 102
Width = 90
Height = 21
AutoSize = False
Caption = 'Max Clients'
end
object MaxInactivityLabel: TLabel
Left = 7
Top = 114
Width = 78
Height = 19
Left = 8
Top = 132
Width = 90
Height = 21
AutoSize = False
Caption = 'Max Inactivity'
end
object PortLabel: TLabel
Left = 7
Top = 62
Width = 78
Height = 19
Left = 8
Top = 72
Width = 90
Height = 21
AutoSize = False
Caption = 'Listening Port'
end
object InterfaceLabel: TLabel
Left = 7
Top = 36
Width = 78
Height = 19
Left = 8
Top = 42
Width = 90
Height = 21
AutoSize = False
Caption = 'Interfaces (IPs)'
end
object AuthTypesLabel: TLabel
Left = 7
Top = 140
Width = 78
Height = 19
object MaxConConLabel: TLabel
Left = 8
Top = 159
Width = 89
Height = 22
AutoSize = False
Caption = 'Auth Types'
Caption = 'Max Con-Conn'
end
object AutoStartCheckBox: TCheckBox
Left = 7
Top = 10
Width = 117
Height = 20
Left = 8
Top = 12
Width = 135
Height = 23
Hint = 'Automatically start Web server'
Caption = 'Auto Startup'
ParentShowHint = False
......@@ -82,20 +82,20 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 0
end
object MaxClientsEdit: TEdit
Left = 85
Top = 88
Width = 39
Height = 21
Left = 98
Top = 102
Width = 45
Height = 23
Hint = 'Maximum number of simultaneous clients (0=unlimited)'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object MaxInactivityEdit: TEdit
Left = 85
Top = 114
Width = 39
Height = 21
Left = 98
Top = 132
Width = 45
Height = 23
Hint =
'Maximum number of seconds of inactivity before disconnect (defau' +
'lt=120)'
......@@ -104,20 +104,20 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 5
end
object PortEdit: TEdit
Left = 85
Top = 62
Width = 39
Height = 21
Left = 98
Top = 72
Width = 45
Height = 23
Hint = 'TCP port to use for HTTP connections (default=80)'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object NetworkInterfaceEdit: TEdit
Left = 85
Top = 36
Width = 156
Height = 21
Left = 98
Top = 42
Width = 180
Height = 23
Hint =
'Comma-separated list of IP addresses to accept incoming connecti' +
'ons'
......@@ -126,22 +126,22 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 2
end
object HostnameCheckBox: TCheckBox
Left = 148
Top = 10
Width = 119
Height = 20
Left = 171
Top = 12
Width = 137
Height = 23
Hint = 'Automatically lookup client'#39's hostnames via DNS'
Caption = 'Hostname Lookup'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object AuthTypesEdit: TEdit
Left = 85
Top = 140
Width = 156
Height = 21
Hint = 'Comma-separated list of default authentication types allowed'
object MaxConConEdit: TEdit
Left = 98
Top = 159
Width = 45
Height = 23
Hint = 'Maximum Concurrent Connections from same IP (0=unlimited)'
ParentShowHint = False
ShowHint = True
TabOrder = 6
......@@ -151,26 +151,26 @@ object WebCfgDlg: TWebCfgDlg
Caption = 'TLS'
ImageIndex = 5
object TlsInterfaceLabel: TLabel
Left = 7
Top = 36
Width = 78
Height = 19
Left = 8
Top = 42
Width = 90
Height = 21
AutoSize = False
Caption = 'Interfaces (IPs)'
end
object TlsPortLabel: TLabel
Left = 7
Top = 62
Width = 78
Height = 19
Left = 8
Top = 72
Width = 90
Height = 21
AutoSize = False
Caption = 'Listening Port'
end
object TlsEnableCheckBox: TCheckBox
Left = 7
Top = 10
Width = 117
Height = 20
Left = 8
Top = 12
Width = 135
Height = 23
Hint = 'Enables HTTPS (HTTP over TLS/SSL)'
Caption = 'Enabled'
ParentShowHint = False
......@@ -179,9 +179,9 @@ object WebCfgDlg: TWebCfgDlg
OnClick = TlsEnableCheckBoxClick
end
object TlsInterfaceEdit: TEdit
Left = 85
Top = 36
Width = 156
Left = 98
Top = 42
Width = 180
Height = 21
Hint =
'Comma-separated list of IP addresses to accept incoming connecti' +
......@@ -191,9 +191,9 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 1
end
object TlsPortEdit: TEdit
Left = 85
Top = 62
Width = 39
Left = 98
Top = 72
Width = 45
Height = 21
Hint = 'TCP port to use for HTTPS connections (default=443)'
ParentShowHint = False
......@@ -201,10 +201,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 2
end
object HSTSEnableCheckBox: TCheckBox
Left = 148
Top = 10
Width = 119
Height = 20
Left = 171
Top = 12
Width = 137
Height = 23
Hint = 'HTTP Strict Transport Security'
Caption = 'HSTS Support'
ParentShowHint = False
......@@ -216,141 +216,159 @@ object WebCfgDlg: TWebCfgDlg
Caption = 'HTTP'
ImageIndex = 3
object HtmlDirLabel: TLabel
Left = 7
Top = 10
Width = 78
Height = 20
Left = 8
Top = 12
Width = 90
Height = 23
AutoSize = False
Caption = 'HTML Root'
end
object ErrorSubDirLabel: TLabel
Left = 7
Top = 36
Width = 78
Height = 20
Left = 8
Top = 42
Width = 90
Height = 23
AutoSize = False
Caption = 'Error SubDir'
end
object ServerSideJsExtLabel: TLabel
Left = 7
Top = 114
Width = 143
Height = 20
Left = 8
Top = 132
Width = 165
Height = 23
AutoSize = False
Caption = 'Server-Side JS File Extension'
end
object IndexLabel: TLabel
Left = 7
Top = 62
Width = 78
Height = 20
Left = 8
Top = 72
Width = 90
Height = 23
AutoSize = False
Caption = 'Index Files'
end
object HtmlRootEdit: TEdit
Left = 85
Top = 10
Width = 156
object AuthTypesLabel: TLabel
Left = 8
Top = 102
Width = 90
Height = 21
AutoSize = False
Caption = 'Auth Types'
end
object HtmlRootEdit: TEdit
Left = 98
Top = 12
Width = 180
Height = 23
Hint = 'Root directory for HTML files (off of CTRL directory)'
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object ErrorSubDirEdit: TEdit
Left = 85
Top = 36
Width = 156
Height = 21
Left = 98
Top = 42
Width = 180
Height = 23
Hint = 'Error sub-directory (off of HTML root)'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object ServerSideJsExtEdit: TEdit
Left = 156
Top = 114
Width = 85
Height = 21
Left = 180
Top = 132
Width = 98
Height = 23
Hint =
'File extension that denotes server-side JavaScript files (e.g. "' +
'.ssjs")'
ParentShowHint = False
ShowHint = True
TabOrder = 3
TabOrder = 4
end
object VirtualHostsCheckBox: TCheckBox
Left = 7
Top = 140
Width = 85
Height = 19
Left = 8
Top = 162
Width = 98
Height = 21
Hint = 'Support virtual host directories off the HTML root directory'
Caption = 'Virtual Hosts'
ParentShowHint = False
ShowHint = True
TabOrder = 4
TabOrder = 5
end
object IndexFileEdit: TEdit
Left = 85
Top = 62
Width = 156
Height = 21
Left = 98
Top = 72
Width = 180
Height = 23
Hint =
'List of filenames that will be automatically sent to client (e.g' +
'. index.html)'
TabOrder = 2
end
object AuthTypesEdit: TEdit
Left = 98
Top = 102
Width = 180
Height = 23
Hint = 'Comma-separated list of default authentication types allowed'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
end
object CGITabSheet: TTabSheet
Caption = 'CGI'
ImageIndex = 4
object CGIDirLabel: TLabel
Left = 7
Top = 36
Width = 78
Height = 20
Left = 8
Top = 42
Width = 90
Height = 23
AutoSize = False
Caption = 'SubDirectory'
end
object CGIExtLabel: TLabel
Left = 7
Top = 62
Width = 78
Height = 20
Left = 8
Top = 72
Width = 90
Height = 23
AutoSize = False
Caption = 'File Extensions'
end
object CGIMaxInactivityLabel: TLabel
Left = 7
Top = 114
Width = 78
Height = 19
Left = 8
Top = 132
Width = 90
Height = 21
AutoSize = False
Caption = 'Max Inactivity'
end
object CGIContentLabel: TLabel
Left = 7
Top = 88
Width = 78
Height = 20
Left = 8
Top = 102
Width = 90
Height = 23
AutoSize = False
Caption = 'Content-Type'
end
object CGIDirEdit: TEdit
Left = 85
Top = 36
Width = 156
Height = 21
Left = 98
Top = 42
Width = 180
Height = 23
Hint = 'CGI sub-directory (off of HTML root)'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object CGICheckBox: TCheckBox
Left = 7
Top = 10
Width = 228
Height = 20
Left = 8
Top = 12
Width = 263
Height = 23
Hint = 'CGI support is enabled when checked'
Caption = 'Enabled'
ParentShowHint = False
......@@ -359,20 +377,20 @@ object WebCfgDlg: TWebCfgDlg
OnClick = CGICheckBoxClick
end
object CGIExtEdit: TEdit
Left = 85
Top = 62
Width = 156
Height = 21
Left = 98
Top = 72
Width = 180
Height = 23
Hint = 'File extensions that denote CGI executable files'
ParentShowHint = False
ShowHint = True
TabOrder = 2
end
object CGIMaxInactivityEdit: TEdit
Left = 85
Top = 114
Width = 39
Height = 21
Left = 98
Top = 132
Width = 45
Height = 23
Hint =
'Maximum number of seconds of inactivity before disconnect (defau' +
'lt=120)'
......@@ -381,29 +399,29 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 4
end
object CGIContentEdit: TEdit
Left = 85
Top = 88
Width = 156
Height = 21
Left = 98
Top = 102
Width = 180
Height = 23
Hint = 'Default Content-Type for CGI output'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object CGIEnvButton: TButton
Left = 7
Top = 143
Width = 117
Height = 20
Left = 8
Top = 165
Width = 135
Height = 23
Caption = 'Environment Vars'
TabOrder = 5
OnClick = CGIEnvButtonClick
end
object WebHandlersButton: TButton
Left = 130
Top = 143
Width = 111
Height = 20
Left = 150
Top = 165
Width = 128
Height = 23
Caption = 'Content Handlers'
TabOrder = 6
OnClick = WebHandlersButtonClick
......@@ -413,18 +431,18 @@ object WebCfgDlg: TWebCfgDlg
Caption = 'Log'
ImageIndex = 1
object LogBaseLabel: TLabel
Left = 7
Top = 88
Width = 78
Height = 20
Left = 8
Top = 102
Width = 90
Height = 23
AutoSize = False
Caption = 'Base Filename'
end
object DebugTxCheckBox: TCheckBox
Left = 7
Top = 34
Width = 156
Height = 20
Left = 8
Top = 39
Width = 180
Height = 23
Hint = 'Log (debug) transmitted HTTP responses'
Caption = 'Transmitted Responses'
ParentShowHint = False
......@@ -432,10 +450,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 1
end
object DebugRxCheckBox: TCheckBox
Left = 7
Top = 10
Width = 156
Height = 19
Left = 8
Top = 12
Width = 180
Height = 21
Hint = 'Log (debug) all received HTTP requests'
Caption = 'Received Requests'
ParentShowHint = False
......@@ -443,10 +461,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 0
end
object AccessLogCheckBox: TCheckBox
Left = 7
Top = 59
Width = 156
Height = 19
Left = 8
Top = 68
Width = 180
Height = 22
Hint = 'Create HTTP access log files'
Caption = 'Create Access Log Files'
ParentShowHint = False
......@@ -455,9 +473,9 @@ object WebCfgDlg: TWebCfgDlg
OnClick = AccessLogCheckBoxClick
end
object LogBaseNameEdit: TEdit
Left = 85
Top = 88
Width = 156
Left = 98
Top = 102
Width = 180
Height = 21
Hint = 'Base directory and filename for HTTP access log files'
ParentShowHint = False
......@@ -469,10 +487,10 @@ object WebCfgDlg: TWebCfgDlg
Caption = 'Sound'
ImageIndex = 2
object ConfigureSoundButton: TButton
Left = 8
Top = 8
Width = 257
Height = 25
Left = 9
Top = 9
Width = 297
Height = 29
Caption = 'Configure Common Server Event Sounds'
TabOrder = 0
OnClick = ConfigureSoundButtonClick
......@@ -480,10 +498,10 @@ object WebCfgDlg: TWebCfgDlg
end
end
object OKBtn: TButton
Left = 20
Top = 211
Width = 76
Height = 25
Left = 23
Top = 243
Width = 88
Height = 29
Anchors = [akLeft, akBottom]
Caption = 'OK'
Default = True
......@@ -492,10 +510,10 @@ object WebCfgDlg: TWebCfgDlg
OnClick = OKBtnClick
end
object CancelBtn: TButton
Left = 104
Top = 211
Width = 75
Height = 25
Left = 120
Top = 243
Width = 87
Height = 29
Anchors = [akLeft, akBottom]
Cancel = True
Caption = 'Cancel'
......@@ -503,10 +521,10 @@ object WebCfgDlg: TWebCfgDlg
TabOrder = 2
end
object ApplyBtn: TButton
Left = 189
Top = 211
Width = 76
Height = 25
Left = 218
Top = 243
Width = 88
Height = 29
Anchors = [akLeft, akBottom]
Cancel = True
Caption = 'Apply'
......
......@@ -97,10 +97,12 @@ __published: // IDE-managed Components
TLabel *TlsInterfaceLabel;
TLabel *TlsPortLabel;
TEdit *TlsPortEdit;
TLabel *AuthTypesLabel;
TEdit *AuthTypesEdit;
TCheckBox *HSTSEnableCheckBox;
TButton *ConfigureSoundButton;
TLabel *AuthTypesLabel;
TEdit *AuthTypesEdit;
TLabel *MaxConConLabel;
TEdit *MaxConConEdit;
void __fastcall FormShow(TObject *Sender);
void __fastcall OKBtnClick(TObject *Sender);
void __fastcall AccessLogCheckBoxClick(TObject *Sender);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment