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)    (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 (Boolean, string)    (declared in TROThread)

Initializes the instance with the given arguments.

constructor Create(iCreateSuspended: Boolean; const iName: string)

Parameters:

  • iCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
  • iName: 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.

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 write

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

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 write

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)    (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 (Boolean, string)    (declared in TROThread)

Initializes the instance with the given arguments.

constructor Create(iCreateSuspended: Boolean; const iName: string)

Parameters:

  • iCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
  • iName: 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.

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

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