Unit CastleClientServer

Functions and Procedures
Constants
Variables

Description

Client and server for network communication using TCP (TCastleTCPClient, TCastleTCPServer). Use this in your games for easy client/server communication. On Android, it requires adding a service client_server (see https://github.com/castle-engine/castle-engine/wiki/Android-Project-Services-Integrated-with-Castle-Game-Engine). On other platforms, it requires having Indy (http://www.indyproject.org/) available (note that Indy is not distributed together with Castle Game Engine, you need to download it yourself, and point the compiler to find Indy sources).

Uses

  • Classes
  • SysUtils
  • Generics.Collections
  • IdTCPServer
  • IdTCPClient
  • IdContext
  • IdSocketHandle
  • IdGlobal

Overview

Classes, Interfaces, Objects and Records

Name Description
Record TClientConnection  
Record TMessageClientRecord  
Class TThreadSynchronisationHandler Because Indys version isn't generic in FPC.
Class TCastleTCPClientThread  
Class TCastleSocket  
Class TCastleTCPServer  
Class TCastleTCPClient  

Types

TProcedureObject = procedure of object;
TConnectionEvent = procedure of object;
TClientConnectionEvent = procedure(AClientConnection: TClientConnection) of object;
TMessageRecievedEvent = procedure(const AMessage: String) of object;
TClientMessageRecievedEvent = procedure(const AMessage: String; AClientConnection: TClientConnection) of object;
TSynchronisedStringList = specialize TThreadList<String>;
TMessageClientList = specialize TThreadList<TMessageClientRecord>;
TClientContextList = specialize TThreadList<TIdContext>;

Description

Types

TProcedureObject = procedure of object;
 
TConnectionEvent = procedure of object;
 
TClientConnectionEvent = procedure(AClientConnection: TClientConnection) of object;
 
TMessageRecievedEvent = procedure(const AMessage: String) of object;
 
TClientMessageRecievedEvent = procedure(const AMessage: String; AClientConnection: TClientConnection) of object;
 
TSynchronisedStringList = specialize TThreadList<String>;
 
TMessageClientList = specialize TThreadList<TMessageClientRecord>;
 
TClientContextList = specialize TThreadList<TIdContext>;
 

Generated by PasDoc 0.15.0.