Unit Olf.Net.Socket.Messaging

Description

C2PP ***************************************************************************

Socket Messaging Library Copyright (c) 2023-2026 Patrick PREMARTIN

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

***************************************************************************

Socket Messaging is a Delphi Library for managing a messaging system over TCP/IP sockets between clients and servers or peer to peer programs.

The library can be used in any Delphi project on recent versions of the environment. It uses the TSocket class from System.Net.Socket, threads and generic collections.

To use this library more simply, and obtain the source code you need to use a client and server in your project, with your own interface, without coding, use this code generator : https://smcodegenerator.olfsoftware.fr/

***************************************************************************

Author(s) : Patrick PREMARTIN

Site : https://socketmessaging.developpeur-pascal.fr/

Project site : https://github.com/DeveloppeurPascal/Socket-Messaging-Library

*************************************************************************** File last update : 2025-05-26T15:45:34.864+02:00 Signature : 965df8e6ff69e8456cd70c722416af41359b6e91 ***************************************************************************

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TOlfSMException  
Class TOlfSMMessage  
Interface IOlfSMMessagesRegister  
Class TOlfSMServer  
Class TOlfSMSrvConnectedClient  
Class TOlfSMSrvConnectedClientsList  
Class TOlfSMClient  

Types

TOlfSMMessageID = byte;
TOlfSMMessageSize = int64;
TOlfSMMessagesDict = TObjectDictionary<TOlfSMMessageID, TOlfSMMessage>;
TOlfSMReceivedMessageEvent = procedure(Const ASender : TOlfSMSrvConnectedClient; Const AMessage: TOlfSMMessage) of object;
TOlfSMReceivedMessageEvent = procedure (Const ASender: TOlfSMSrvConnectedClient; Const AMessage: T) of object;
TOlfMessageSubscribers = TList<TOlfSMReceivedMessageEvent>;
TOlfSubscribers = TObjectDictionary<TOlfSMMessageID, TOlfMessageSubscribers>;
TOlfSMServerEvent = procedure(AServer: TOlfSMServer) of object;
TOlfSMEncodeDecodeMessageEvent = function(AFrom: TStream): TStream of object;
TOlfSMConnectedClientProc = reference to procedure(Const AConnectedClient : TOlfSMSrvConnectedClient);
TOlfSMConnectedClientEvent = procedure(Const AConnectedClient : TOlfSMSrvConnectedClient) of object;
TOlfMessageID = TOlfSMMessageID;
TOlfMessageSize = TOlfSMMessageSize;
TOlfSocketMessagingServerConnectedClient = TOlfSMSrvConnectedClient;
TOlfSocketMessagingException = TOlfSMException;
TOlfSocketMessagingServer = TOlfSMServer;
TOlfSocketMessagingClient = TOlfSMClient;
TOlfSocketMessage = TOlfSMMessage;
TOlfSocketMessagesDict = TOlfSMMessagesDict;
IOlfSocketMessagesRegister = IOlfSMMessagesRegister;
TOlfReceivedMessageEvent = TOlfSMReceivedMessageEvent;

Description

Types

TOlfSMMessageID = byte;

This item has no description.

TOlfSMMessageSize = int64;

256 messages (0..255)

TOlfSMMessagesDict = TObjectDictionary<TOlfSMMessageID, TOlfSMMessage>;

This item has no description.

TOlfSMReceivedMessageEvent = procedure(Const ASender : TOlfSMSrvConnectedClient; Const AMessage: TOlfSMMessage) of object;

This item has no description.

TOlfSMReceivedMessageEvent = procedure (Const ASender: TOlfSMSrvConnectedClient; Const AMessage: T) of object;

This item has no description.

TOlfMessageSubscribers = TList<TOlfSMReceivedMessageEvent>;

This item has no description.

TOlfSubscribers = TObjectDictionary<TOlfSMMessageID, TOlfMessageSubscribers>;

This item has no description.

TOlfSMServerEvent = procedure(AServer: TOlfSMServer) of object;

This item has no description.

TOlfSMEncodeDecodeMessageEvent = function(AFrom: TStream): TStream of object;

This item has no description.

TOlfSMConnectedClientProc = reference to procedure(Const AConnectedClient : TOlfSMSrvConnectedClient);

This item has no description.

TOlfSMConnectedClientEvent = procedure(Const AConnectedClient : TOlfSMSrvConnectedClient) of object;

This item has no description.

TOlfMessageID = TOlfSMMessageID;

************************************************** * For compatibility with existing code * Don't use this types in a new project. ************************************************** <summary> DEPRECATED : use TOlfSMMessageID </summary>

TOlfMessageSize = TOlfSMMessageSize;

DEPRECATED : use TOlfSMMessageSize

TOlfSocketMessagingServerConnectedClient = TOlfSMSrvConnectedClient;

DEPRECATED : use TOlfSMSrvConnectedClient

TOlfSocketMessagingException = TOlfSMException;

DEPRECATED : use TOlfSMException

TOlfSocketMessagingServer = TOlfSMServer;

DEPRECATED : use TOlfSMServer

TOlfSocketMessagingClient = TOlfSMClient;

DEPRECATED : use TOlfSMClient

TOlfSocketMessage = TOlfSMMessage;

DEPRECATED : use TOlfSMMessage

TOlfSocketMessagesDict = TOlfSMMessagesDict;

DEPRECATED : use TOlfSMMessagesDict

IOlfSocketMessagesRegister = IOlfSMMessagesRegister;

DEPRECATED : use IOlfSMMessagesRegister

TOlfReceivedMessageEvent = TOlfSMReceivedMessageEvent;

DEPRECATED : use TOlfSMReceivedMessageEvent

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