TROPipeListenerThread

Overview

The TROPipeListenerThread internal thread class is designed to work together with the TRONamedPipeServer class; it represents a thread spawned by the server to listen for and process client requests.
This class is RO internal, users don't need to use or instantiate it.

Location

 

constructor Create (Boolean, string)    (declared in TROThread)

Initializes the instance with the given arguments.

constructor Create(aCreateSuspended: Boolean; const aName: string)

Parameters:

  • aCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
  • aName: Become the value of the Name property.

constructor Create (Boolean)    (declared in TROInitializedThread)

Creates a new class instance (standard thread class constructor).

constructor Create(CreateSuspended: Boolean)

Parameters:

  • CreateSuspended: When set to true, this parameter allows to create a thread that will not be started right after it is created. This allows to do some thread class configuration before the execution begins.

constructor Create (TRONamedPipeServer)

Creates a new thread class specifying the owning server instance.

constructor Create(const aServer: TRONamedPipeServer)

Parameters:

  • aServer: Owning server instance

DoTerminate  protected override    (declared in TROThread)

procedure DoTerminate

Execute  protected override    (declared in TROInitializedThread)

This method will be executed on the background thread, and should contain the user code. In this class, the Execute method must not be overridden in descendant classes, override IntExecute instead.

procedure Execute

FatalError  protected

If an exception occurs during thread execution, this property contains the reference to it. This reference is needed to be passed to the main thread to raise the exception there.

property FatalError: TObject read write

Free  reintroduce    (declared in TROThread)

procedure Free

Name  protected    (declared in TROThread)

Sets a readable name for the thread.

property Name: string read

PipeName  protected

Contains the named pipe name which listens for incoming client requests.

property PipeName: string read write

Server  protected

Points to the server instance that has spawned the thread.

property Server: TRONamedPipeServer read write

SetName  protected    (declared in TROThread)

procedure SetName(const aName: string)

Parameters:

  • aName:

TerminateWaitFor  virtual    (declared in TROThread)

Utility method that combines a call to Terminate with a subsequent call to WaitFor.

procedure TerminateWaitFor

WaitFor  reintroduce    (declared in TROThread)

Blocks the current thread until the current event receives a signal.

function WaitFor: Cardinal

 

FatalError  protected

If an exception occurs during thread execution, this property contains the reference to it. This reference is needed to be passed to the main thread to raise the exception there.

property FatalError: TObject read write

Name  protected    (declared in TROThread)

Sets a readable name for the thread.

property Name: string read

PipeName  protected

Contains the named pipe name which listens for incoming client requests.

property PipeName: string read write

Server  protected

Points to the server instance that has spawned the thread.

property Server: TRONamedPipeServer read write

 

constructor Create (Boolean, string)    (declared in TROThread)

Initializes the instance with the given arguments.

constructor Create(aCreateSuspended: Boolean; const aName: string)

Parameters:

  • aCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
  • aName: Become the value of the Name property.

constructor Create (Boolean)    (declared in TROInitializedThread)

Creates a new class instance (standard thread class constructor).

constructor Create(CreateSuspended: Boolean)

Parameters:

  • CreateSuspended: When set to true, this parameter allows to create a thread that will not be started right after it is created. This allows to do some thread class configuration before the execution begins.

constructor Create (TRONamedPipeServer)

Creates a new thread class specifying the owning server instance.

constructor Create(const aServer: TRONamedPipeServer)

Parameters:

  • aServer: Owning server instance

DoTerminate  protected override    (declared in TROThread)

procedure DoTerminate

Execute  protected override    (declared in TROInitializedThread)

This method will be executed on the background thread, and should contain the user code. In this class, the Execute method must not be overridden in descendant classes, override IntExecute instead.

procedure Execute

Free  reintroduce    (declared in TROThread)

procedure Free

SetName  protected    (declared in TROThread)

procedure SetName(const aName: string)

Parameters:

  • aName:

TerminateWaitFor  virtual    (declared in TROThread)

Utility method that combines a call to Terminate with a subsequent call to WaitFor.

procedure TerminateWaitFor

WaitFor  reintroduce    (declared in TROThread)

Blocks the current thread until the current event receives a signal.

function WaitFor: Cardinal