TROPipeConnectionThread

Overview

Instances of the TROPipeConnectionThread class are used in the named pipe server (TRONamedPipeServer class) to handle all incoming connections.
This class is not intended to be used by users.

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 (THandle, TRONamedPipeServer)

Creates a new thread instance.

constructor Create(aPipe: THandle; aServer: TRONamedPipeServer)

Parameters:

  • aPipe: Handle of the named pipe instance associated with the connection.
  • aServer: Reference to the named pipe server component the connection thread belongs to.

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.

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

When an exception occurs during thread execution, this property stops executing and the exception object is assigned to this property.

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

PipeHandle  protected

The handle of the named pipe instance associated with the connection.

property PipeHandle: THandle read write

Server  protected

Contains the reference to the named pipe server component the connection thread belongs to.

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

Transport  protected

The transport object that corresponds to the Server.

property Transport: IROTransport read write

WaitFor  reintroduce    (declared in TROThread)

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

function WaitFor: Cardinal

 

FatalError  protected

When an exception occurs during thread execution, this property stops executing and the exception object is assigned to this property.

property FatalError: TObject read write

Name  protected    (declared in TROThread)

Sets a readable name for the thread.

property Name: string read

PipeHandle  protected

The handle of the named pipe instance associated with the connection.

property PipeHandle: THandle read write

Server  protected

Contains the reference to the named pipe server component the connection thread belongs to.

property Server: TRONamedPipeServer read write

Transport  protected

The transport object that corresponds to the Server.

property Transport: IROTransport 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 (THandle, TRONamedPipeServer)

Creates a new thread instance.

constructor Create(aPipe: THandle; aServer: TRONamedPipeServer)

Parameters:

  • aPipe: Handle of the named pipe instance associated with the connection.
  • aServer: Reference to the named pipe server component the connection thread belongs to.

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.

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