Class TSChannelWSocket

Unit

Declaration

type TSChannelWSocket = class(TWSocket)

Description

ICS TWSocket descendant supporting TLS

Hierarchy

Overview

Methods

Public constructor Create(AOwner : TComponent); override;
Public destructor Destroy; override;
Public procedure Listen; override;
Public procedure Shutdown(How : Integer); override;
Public procedure PostFD_EVENT(Event: Cardinal);

Properties

Published property Secure: Boolean read FSecure write SetSecure;
Published property PayloadReadCount: Int64 read FPayloadReadCount;
Published property PayloadWriteCount: Int64 read FPayloadWriteCount;
Published property SessionData: TSessionData read FSessionData write SetSessionData;
Published property OnTLSDone: TNotifyEvent read FOnTLSDone write FOnTLSDone;
Published property OnTLSShutdown: TNotifyEvent read FOnTLSShutdown write FOnTLSShutdown;

Description

Methods

Public constructor Create(AOwner : TComponent); override;
 
Public destructor Destroy; override;
 
Public procedure Listen; override;

Override for inherited method - deny listening in secure mode

Public procedure Shutdown(How : Integer); override;

Override for inherited method - shutdown TLS channel before closing the connection (ignoring exceptions and don't waiting for peer response)

Public procedure PostFD_EVENT(Event: Cardinal);

Imitate FD_* event on a socket. Mostly useful with FD_READ to have DataAvailable with buffering socket implementations

Properties

Published property Secure: Boolean read FSecure write SetSecure;

Indicates whether TLS is currently used. Effect of setting the property depends on current state.
Socket is not connected:

  • Setting Secure to True: TLS handshake will be established automatically as soon as socket is connected.

  • Setting Secure to False: work as usual (no TLS)

Socket is connected:

  • Setting Secure to True: TLS handshake will be started immediately over existing connection

  • Setting Secure to False: TLS shutdown will be executed immediately without closing the connection

Published property PayloadReadCount: Int64 read FPayloadReadCount;

Traffic counter for incoming payload. TWSocket.ReadCount property reflects encrypted traffic

Published property PayloadWriteCount: Int64 read FPayloadWriteCount;

Traffic counter for outgoing payload. TWSocket.WriteCount property reflects encrypted traffic

Published property SessionData: TSessionData read FSessionData write SetSessionData;

TLS Session data that allows fine tuning of TLS handshake. Also it could contain shared credentials used by multiple sockets. Fields must be assigned before starting TLS handshake (otherwise exception is raised). Note that some fields are assigned internally based on other values (f.ex., sfNoServerVerify flag is enabled if connecting to IP). Initial values are returned when secure connection is finished. ! Session data is finalized in destructor, closing and zeroing any non-shared handles.

Published property OnTLSDone: TNotifyEvent read FOnTLSDone write FOnTLSDone;

Event is called when TLS handshake is established successfully

Published property OnTLSShutdown: TNotifyEvent read FOnTLSShutdown write FOnTLSShutdown;

Event is called when TLS handshake is shut down


Generated by PasDoc 0.16.0.