Difference between revisions of "TWinsock2UDPServerThreads"
From Ultibo.org
								
												
				 (Created page with "Return to Unit Winsock2   __TOC__  === Description === ----  ''To be documented''  === Class definitions === ----   <div class="toccolours mw-collapsible mw-...")  | 
				|||
| Line 22: | Line 22: | ||
|-  | |-  | ||
| <code>constructor Create(AListener:TWinsock2UDPListener);</code>  | | <code>constructor Create(AListener:TWinsock2UDPListener);</code>  | ||
| + | | style="width: 50%;"|   | ||
| + | |-  | ||
| + | | <code>destructor Destroy; override;</code>  | ||
| style="width: 50%;"|   | | style="width: 50%;"|   | ||
|-  | |-  | ||
| Line 27: | Line 30: | ||
|-  | |-  | ||
| <code>FMin:Integer;</code>  | | <code>FMin:Integer;</code>  | ||
| − | |   | + | | Minimum thread count to maintain in server thread pool  | 
|-  | |-  | ||
| <code>FMax:Integer;</code>  | | <code>FMax:Integer;</code>  | ||
| + | | Maximum thread count to maintain in thread pool, threads above max will terminate on completion  | ||
| + | |-  | ||
| + | | <code>FLimit:Integer;</code>  | ||
| + | | Absolute thread count limit, new threads will not be created once reached (0 = No Limit)  | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>FWait:TSemaphoreHandle;</code>  | ||
|    | |    | ||
| + | |-  | ||
| + | | <code>FWaitTimeout:LongWord;</code>  | ||
| + | | Time to wait for a thread to be available before creating a new thread (0 = No Wait / INFINITE = Wait Forever)  | ||
|-  | |-  | ||
|colspan="2"|   | |colspan="2"|   | ||
| Line 49: | Line 63: | ||
|-  | |-  | ||
| <code>procedure SetMax(AMax:Integer);</code>  | | <code>procedure SetMax(AMax:Integer);</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>function GetLimit:Integer;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>procedure SetLimit(ALimit:Integer);</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>function GetWaitTimeout:LongWord;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>procedure SetWaitTimeout(AWaitTimeout:LongWord);</code>  | ||
|    | |    | ||
|-  | |-  | ||
| Line 56: | Line 84: | ||
|    | |    | ||
|-  | |-  | ||
| − | | <code>function CreateThread(AForce:Boolean):TWinsock2UDPServerThread;</code>  | + | | <code>function CreateThread(AForce,ASignal:Boolean):TWinsock2UDPServerThread;</code>  | 
|    | |    | ||
|-  | |-  | ||
| Line 68: | Line 96: | ||
|-  | |-  | ||
| <code>property Max:Integer read GetMax write SetMax;</code>  | | <code>property Max:Integer read GetMax write SetMax;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | | <code>property Limit:Integer read GetLimit write SetLimit;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>property WaitTimeout:LongWord read GetWaitTimeout write SetWaitTimeout;</code>  | ||
|    | |    | ||
|-  | |-  | ||
| Line 96: | Line 132: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
<pre style="border: 0; padding-bottom:0px;">constructor TWinsock2UDPServerThreads.Create(AListener:TWinsock2UDPListener);</pre>  | <pre style="border: 0; padding-bottom:0px;">constructor TWinsock2UDPServerThreads.Create(AListener:TWinsock2UDPListener);</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">destructor TWinsock2UDPServerThreads.Destroy;</pre>  | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 144: | Line 192: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
<pre style="border: 0; padding-bottom:0px;">procedure TWinsock2UDPServerThreads.SetMax(AMax:Integer);</pre>  | <pre style="border: 0; padding-bottom:0px;">procedure TWinsock2UDPServerThreads.SetMax(AMax:Integer);</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TWinsock2UDPServerThreads.GetLimit:Integer;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure TWinsock2UDPServerThreads.SetLimit(ALimit:Integer);</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">function TWinsock2UDPServerThreads.GetWaitTimeout:LongWord;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Note  | ||
| + | | None documented  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| + | <pre style="border: 0; padding-bottom:0px;">procedure TWinsock2UDPServerThreads.SetWaitTimeout(AWaitTimeout:LongWord);</pre>  | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| Line 167: | Line 263: | ||
<br />  | <br />  | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
| − | <pre style="border: 0; padding-bottom:0px;">function TWinsock2UDPServerThreads.CreateThread(AForce:Boolean):TWinsock2UDPServerThread;</pre>  | + | <pre style="border: 0; padding-bottom:0px;">function TWinsock2UDPServerThreads.CreateThread(AForce,ASignal:Boolean):TWinsock2UDPServerThread;</pre>  | 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>  | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
Latest revision as of 05:06, 8 October 2025
Return to Unit Winsock2
Description
To be documented
Class definitions
TWinsock2UDPServerThreads = class(TWinsock2SocketThreads)
public 
 | |
 constructor Create(AListener:TWinsock2UDPListener);
 | 
|
 destructor Destroy; override;
 | 
|
private 
 | |
 FMin:Integer;
 | 
Minimum thread count to maintain in server thread pool | 
 FMax:Integer;
 | 
Maximum thread count to maintain in thread pool, threads above max will terminate on completion | 
 FLimit:Integer;
 | 
Absolute thread count limit, new threads will not be created once reached (0 = No Limit) | 
 FWait:TSemaphoreHandle;
 | 
|
 FWaitTimeout:LongWord;
 | 
Time to wait for a thread to be available before creating a new thread (0 = No Wait / INFINITE = Wait Forever) | 
 FListener:TWinsock2UDPListener;
 | 
|
 function GetMin:Integer;
 | 
|
 procedure SetMin(AMin:Integer);
 | 
|
 function GetMax:Integer;
 | 
|
 procedure SetMax(AMax:Integer);
 | 
|
 function GetLimit:Integer;
 | 
|
 procedure SetLimit(ALimit:Integer);
 | 
|
 function GetWaitTimeout:LongWord;
 | 
|
 procedure SetWaitTimeout(AWaitTimeout:LongWord);
 | 
|
 procedure CreateThreads;
 | 
|
 function CreateThread(AForce,ASignal:Boolean):TWinsock2UDPServerThread;
 | 
|
 procedure TerminateThread(AThread:TWinsock2UDPServerThread);
 | 
|
public 
 | |
 property Min:Integer read GetMin write SetMin;
 | 
|
 property Max:Integer read GetMax write SetMax;
 | 
|
 property Limit:Integer read GetLimit write SetLimit;
 | 
|
 property WaitTimeout:LongWord read GetWaitTimeout write SetWaitTimeout;
 | 
|
 function GetThread:TWinsock2UDPServerThread;
 | 
|
 procedure ReleaseThread(AThread:TWinsock2UDPServerThread);
 | 
|
 procedure TerminateAll;
 | 
|
 function Terminate(AThread:TWinsock2UDPServerThread):Boolean;
 | 
|
Function declarations
constructor TWinsock2UDPServerThreads.Create(AListener:TWinsock2UDPListener);
Description: To be documented
| Note | None documented | 
|---|
destructor TWinsock2UDPServerThreads.Destroy;
Description: To be documented
| Note | None documented | 
|---|
function TWinsock2UDPServerThreads.GetMin:Integer;
Description: To be documented
| Note | None documented | 
|---|
procedure TWinsock2UDPServerThreads.SetMin(AMin:Integer);
Description: To be documented
| Note | None documented | 
|---|
function TWinsock2UDPServerThreads.GetMax:Integer;
Description: To be documented
| Note | None documented | 
|---|
procedure TWinsock2UDPServerThreads.SetMax(AMax:Integer);
Description: To be documented
| Note | None documented | 
|---|
function TWinsock2UDPServerThreads.GetLimit:Integer;
Description: To be documented
| Note | None documented | 
|---|
procedure TWinsock2UDPServerThreads.SetLimit(ALimit:Integer);
Description: To be documented
| Note | None documented | 
|---|
function TWinsock2UDPServerThreads.GetWaitTimeout:LongWord;
Description: To be documented
| Note | None documented | 
|---|
procedure TWinsock2UDPServerThreads.SetWaitTimeout(AWaitTimeout:LongWord);
Description: To be documented
| Note | None documented | 
|---|
procedure TWinsock2UDPServerThreads.CreateThreads;
Description: To be documented
| Note | None documented | 
|---|
function TWinsock2UDPServerThreads.CreateThread(AForce,ASignal:Boolean):TWinsock2UDPServerThread;
Description: To be documented
| Note | None documented | 
|---|
procedure TWinsock2UDPServerThreads.TerminateThread(AThread:TWinsock2UDPServerThread);
Description: To be documented
| Note | None documented | 
|---|
function TWinsock2UDPServerThreads.GetThread:TWinsock2UDPServerThread;
Description: To be documented
| Note | None documented | 
|---|
procedure TWinsock2UDPServerThreads.ReleaseThread(AThread:TWinsock2UDPServerThread);
Description: To be documented
| Note | None documented | 
|---|
procedure TWinsock2UDPServerThreads.TerminateAll;
Description: To be documented
| Note | None documented | 
|---|
function TWinsock2UDPServerThreads.Terminate(AThread:TWinsock2UDPServerThread):Boolean;
Description: To be documented
| Note | None documented | 
|---|
Return to Unit Reference