Class TOlfSMServer

Unit

Declaration

type TOlfSMServer = class(TInterfacedObject, IOlfSMMessagesRegister)

Description

This item has no description.

Hierarchy

Overview

Methods

Protected procedure ServerLoop; virtual;
Protected function LockMessagesDict: TOlfSMMessagesDict;
Protected procedure UnlockMessagesDict;
Protected function LockSubscribers: TOlfSubscribers;
Protected procedure UnlockSubscribers;
Protected procedure DoClientConnected(Const AClient: TOlfSMSrvConnectedClient);
Protected procedure DoClientLostConnexion(Const AClient: TOlfSMSrvConnectedClient);
Protected procedure DoClientDisconnected(Const AClient: TOlfSMSrvConnectedClient);
Public constructor Create(AIP: string; APort: word); overload; virtual;
Public constructor Create; overload; virtual;
Public procedure Listen; overload; virtual;
Public procedure Listen(AIP: string; APort: word); overload; virtual;
Public function isListening: boolean;
Public function isConnected: boolean;
Public destructor Destroy; override;
Public procedure RegisterMessageToReceive(AMessage: TOlfSMMessage);
Public procedure SubscribeToMessage(AMessageID: TOlfSMMessageID; aReceivedMessageEvent: TOlfSMReceivedMessageEvent);
Public procedure UnsubscribeToMessage(AMessageID: TOlfSMMessageID; aReceivedMessageEvent: TOlfSMReceivedMessageEvent);
Public procedure SendMessageToAll(Const AMessage: TOlfSMMessage; Const ExceptToClient: TOlfSMSrvConnectedClient = nil);
Public procedure ForEachConnectedClient(DoSomethingProc: TOlfSMConnectedClientProc; AllowParallelFor: boolean = true); overload;
Public procedure ForEachConnectedClient(DoSomethingEvent : TOlfSMConnectedClientEvent; AllowParallelFor: boolean = true); overload;

Properties

Protected property Socket: TSocket read GetSocket write SetSocket;
Public property IP: string read GetIP write SetIP;
Public property Port: word read GetPort write SetPort;
Public property ThreadNameForDebugging: string read GetThreadNameForDebugging write SetThreadNameForDebugging;
Public property onServerConnected: TOlfSMServerEvent read FonServerConnected write SetonServerConnected;
Public property onServerDisconnected: TOlfSMServerEvent read FonServerDisconnected write SetonServerDisconnected;
Public property onEncodeMessageToSend: TOlfSMEncodeDecodeMessageEvent read FonEncodeMessageToSend write SetonEncodeMessageToSend;
Public property onDecodeReceivedMessage: TOlfSMEncodeDecodeMessageEvent read FonDecodeReceivedMessage write SetonDecodeReceivedMessage;
Public property onClientConnected: TOlfSMConnectedClientEvent read FonClientConnected write SetonClientConnected;
Public property onClientLostConnection: TOlfSMConnectedClientEvent read FonClientLostConnection write SetonClientLostConnection;
Public property onClientDisconnected: TOlfSMConnectedClientEvent read FonClientDisconnected write SetonClientDisconnected;

Description

Methods

Protected procedure ServerLoop; virtual;

This item has no description.

Protected function LockMessagesDict: TOlfSMMessagesDict;

This item has no description.

Protected procedure UnlockMessagesDict;

This item has no description.

Protected function LockSubscribers: TOlfSubscribers;

This item has no description.

Protected procedure UnlockSubscribers;

This item has no description.

Protected procedure DoClientConnected(Const AClient: TOlfSMSrvConnectedClient);

This item has no description.

Protected procedure DoClientLostConnexion(Const AClient: TOlfSMSrvConnectedClient);

This item has no description.

Protected procedure DoClientDisconnected(Const AClient: TOlfSMSrvConnectedClient);

This item has no description.

Public constructor Create(AIP: string; APort: word); overload; virtual;

This item has no description.

Public constructor Create; overload; virtual;

This item has no description.

Public procedure Listen; overload; virtual;

This item has no description.

Public procedure Listen(AIP: string; APort: word); overload; virtual;

This item has no description.

Public function isListening: boolean;

This item has no description.

Public function isConnected: boolean;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure RegisterMessageToReceive(AMessage: TOlfSMMessage);

This item has no description.

Public procedure SubscribeToMessage(AMessageID: TOlfSMMessageID; aReceivedMessageEvent: TOlfSMReceivedMessageEvent);

This item has no description.

Public procedure UnsubscribeToMessage(AMessageID: TOlfSMMessageID; aReceivedMessageEvent: TOlfSMReceivedMessageEvent);

This item has no description.

Public procedure SendMessageToAll(Const AMessage: TOlfSMMessage; Const ExceptToClient: TOlfSMSrvConnectedClient = nil);

This item has no description.

Public procedure ForEachConnectedClient(DoSomethingProc: TOlfSMConnectedClientProc; AllowParallelFor: boolean = true); overload;

This item has no description.

Public procedure ForEachConnectedClient(DoSomethingEvent : TOlfSMConnectedClientEvent; AllowParallelFor: boolean = true); overload;

This item has no description.

Properties

Protected property Socket: TSocket read GetSocket write SetSocket;

This item has no description.

Public property IP: string read GetIP write SetIP;

This item has no description.

Public property Port: word read GetPort write SetPort;

This item has no description.

Public property ThreadNameForDebugging: string read GetThreadNameForDebugging write SetThreadNameForDebugging;

This item has no description.

Public property onServerConnected: TOlfSMServerEvent read FonServerConnected write SetonServerConnected;

This item has no description.

Public property onServerDisconnected: TOlfSMServerEvent read FonServerDisconnected write SetonServerDisconnected;

This item has no description.

Public property onEncodeMessageToSend: TOlfSMEncodeDecodeMessageEvent read FonEncodeMessageToSend write SetonEncodeMessageToSend;

This item has no description.

Public property onDecodeReceivedMessage: TOlfSMEncodeDecodeMessageEvent read FonDecodeReceivedMessage write SetonDecodeReceivedMessage;

This item has no description.

Public property onClientConnected: TOlfSMConnectedClientEvent read FonClientConnected write SetonClientConnected;

This item has no description.

Public property onClientLostConnection: TOlfSMConnectedClientEvent read FonClientLostConnection write SetonClientLostConnection;

This item has no description.

Public property onClientDisconnected: TOlfSMConnectedClientEvent read FonClientDisconnected write SetonClientDisconnected;

This item has no description.

Socket Messaging Library (c) 2023-2026 Patrick PREMARTIN - Powered by PasDoc
Generated by PasDoc 1.0.2.