TNetworkTransport

From Ultibo.org
Revision as of 05:31, 30 May 2018 by Ultibo (Talk | contribs) (Created page with "Return to Unit Transport __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible m...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Return to Unit Transport


Description


To be documented

Class definitions



TNetworkTransport = class(TListObject)

constructor Create(AManager:TTransportManager; const AName:String);  
destructor Destroy; override;  
private
FLock:TSynchronizerHandle;  
FLocalLock:TMutexHandle;  
protected
FManager:TTransportManager;  
FName:String;  
 
FFamily:Word;  
FPacketType:Word;  
FAdapters:TNetworkList; List of TTransportAdapter objects
FBindings:TNetworkList; List of TTransportBinding objects
FProtocols:TNetworkList; List of TTransportProtocol objects
FFilters:TNetworkList; List of TTransportFilter objects
FConfigs:TNetworkList; List of TTransportConfig objects
 
FStatistics:TTransportStatistics;  
 
function GetName:String;  
 
function AcquireLock:Boolean;  
function ReleaseLock:Boolean;  
 
function SendPacket(ASocket:TTransportSocket; ASource,ADest:Pointer; APacket:PPacketFragment; ASize,AFlags:Integer):Integer; virtual;  
function SendControl(ASource,ADest:Pointer; AProtocol,ACommand,ACode:Word; AAddress,AData:Pointer; ASize:Integer):Boolean; virtual;  
 
function FilterPacket(ASource,ADest,APacket:Pointer;ASize:Integer;ABroadcast:Boolean):Boolean; virtual;  
function ForwardPacket(AAdapter:TTransportAdapter; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean; virtual;  
public
property Manager:TTransportManager read FManager;  
property Name:String read GetName;  
 
property Family:Word read FFamily;  
property PacketType:Word read FPacketType;  
 
function GetSockOpt(ASocket:TTransportSocket; ALevel,AOptName:Integer; AOptValue:PChar; var AOptLength:Integer):Integer; virtual;  
function SetSockOpt(ASocket:TTransportSocket; ALevel,AOptName:Integer; AOptValue:PChar; AOptLength:Integer):Integer; virtual;  
 
function ReaderLock:Boolean;  
function ReaderUnlock:Boolean;  
function WriterLock:Boolean;  
function WriterUnlock:Boolean;  
 
function GetStatistics:TTransportStatistics; virtual;  
 
function GetAdapterByHandle(AHandle:THandle; ALock:Boolean; AState:LongWord):TTransportAdapter;  
function GetAdapterByAdapter(AAdapter:TNetworkAdapter; ALock:Boolean; AState:LongWord):TTransportAdapter;  
function GetAdapterByNext(APrevious:TTransportAdapter; ALock,AUnlock:Boolean; AState:LongWord):TTransportAdapter;  
 
function GetProtocolByHandle(AHandle:THandle; ALock:Boolean; AState:LongWord):TTransportProtocol;  
function GetProtocolByType(AProtocol:Word; ALock:Boolean; AState:LongWord):TTransportProtocol;  
function GetProtocolByProtocol(AProtocol:TTransportProtocol; ALock:Boolean; AState:LongWord):TTransportProtocol;  
function GetProtocolByNext(APrevious:TTransportProtocol; ALock,AUnlock:Boolean; AState:LongWord):TTransportProtocol;  
 
function GetFilterByHandle(AHandle:THandle; ALock:Boolean; AState:LongWord):TTransportFilter;  
function GetFilterByProtocol(AProtocol:Word; ALock:Boolean; AState:LongWord):TTransportFilter;  
function GetFilterByFilter(AFilter:TTransportFilter; ALock:Boolean; AState:LongWord):TTransportFilter;  
function GetFilterByNext(APrevious:TTransportFilter; ALock,AUnlock:Boolean; AState:LongWord):TTransportFilter;  
 
function GetConfigByHandle(AHandle:THandle; ALock:Boolean; AState:LongWord):TTransportConfig;  
function GetConfigByType(AConfigType:Word; ALock:Boolean; AState:LongWord):TTransportConfig;  
function GetConfigByConfig(AConfig:TTransportConfig; ALock:Boolean; AState:LongWord):TTransportConfig;  
function GetConfigByNext(APrevious:TTransportConfig; ALock,AUnlock:Boolean; AState:LongWord):TTransportConfig;  
 
function AddAdapter(AAdapter:TNetworkAdapter; AConfigType:Word; AAddress,ANetmask,AGateway,AServer:Pointer):Boolean; virtual;  
function RemoveAdapter(AAdapter:TNetworkAdapter):Boolean; virtual;  
 
function AddProtocol(AProtocol:Word; APacketHandler:TTransportPacketHandler; AControlHandler:TTransportControlHandler):THandle; virtual;  
function RemoveProtocol(AHandle:THandle; AProtocol:Word):Boolean; virtual;  
 
function AddFilter(AProtocol:Word; AFilterHandler:TTransportFilterHandler):THandle; virtual;  
function RemoveFilter(AHandle:THandle; AProtocol:Word):Boolean; virtual;  
 
function AddConfig(AConfigType:Word; AConfigAuto:Boolean; AConfigHandler:TTransportConfigHandler):THandle; virtual;  
function RemoveConfig(AHandle:THandle; AConfigType:Word):Boolean; virtual;  
 
function StartTransport:Boolean; virtual;  
function StopTransport:Boolean; virtual;  
function ProcessTransport:Boolean; virtual;  
 
function BindTransport(AAdapter:TNetworkAdapter):Boolean; virtual;  
function UnbindTransport(AAdapter:TNetworkAdapter):Boolean; virtual;  


Function declarations



constructor TNetworkTransport.Create(AManager:TTransportManager; const AName:String);
Description: To be documented
Note None documented


destructor TNetworkTransport.Destroy;
Description: To be documented
Note None documented


function TNetworkTransport.GetName:String;
Description: To be documented
Note None documented


function TNetworkTransport.AcquireLock:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.ReleaseLock:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.SendPacket(ASocket:TTransportSocket; ASource,ADest:Pointer; APacket:PPacketFragment; ASize,AFlags:Integer):Integer;
Description: To be documented
Note None documented


function TNetworkTransport.SendControl(ASource,ADest:Pointer; AProtocol,ACommand,ACode:Word; AAddress,AData:Pointer; ASize:Integer):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.FilterPacket(ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.ForwardPacket(AAdapter:TTransportAdapter; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.GetSockOpt(ASocket:TTransportSocket; ALevel,AOptName:Integer; AOptValue:PChar; var AOptLength:Integer):Integer;
Description: To be documented
Note None documented


function TNetworkTransport.SetSockOpt(ASocket:TTransportSocket; ALevel,AOptName:Integer; AOptValue:PChar; AOptLength:Integer):Integer;
Description: To be documented
Note None documented


function TNetworkTransport.ReaderLock:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.ReaderUnlock:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.WriterLock:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.WriterUnlock:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.GetStatistics:TTransportStatistics;
Description: To be documented
Note None documented


function TNetworkTransport.GetAdapterByHandle(AHandle:THandle; ALock:Boolean; AState:LongWord):TTransportAdapter;
Description: To be documented
Note None documented


function TNetworkTransport.GetAdapterByAdapter(AAdapter:TNetworkAdapter; ALock:Boolean; AState:LongWord):TTransportAdapter;
Description: To be documented
Note None documented


function TNetworkTransport.GetAdapterByNext(APrevious:TTransportAdapter; ALock,AUnlock:Boolean; AState:LongWord):TTransportAdapter;
Description: To be documented
Note None documented


function TNetworkTransport.GetProtocolByHandle(AHandle:THandle; ALock:Boolean; AState:LongWord):TTransportProtocol;
Description: To be documented
Note None documented


function TNetworkTransport.GetProtocolByType(AProtocol:Word; ALock:Boolean; AState:LongWord):TTransportProtocol;
Description: To be documented
Note None documented


function TNetworkTransport.GetProtocolByProtocol(AProtocol:TTransportProtocol; ALock:Boolean; AState:LongWord):TTransportProtocol;
Description: To be documented
Note None documented


function TNetworkTransport.GetProtocolByNext(APrevious:TTransportProtocol; ALock,AUnlock:Boolean; AState:LongWord):TTransportProtocol;
Description: To be documented
Note None documented


function TNetworkTransport.GetFilterByHandle(AHandle:THandle; ALock:Boolean; AState:LongWord):TTransportFilter;
Description: To be documented
Note None documented


function TNetworkTransport.GetFilterByProtocol(AProtocol:Word; ALock:Boolean; AState:LongWord):TTransportFilter;
Description: To be documented
Note None documented


function TNetworkTransport.GetFilterByFilter(AFilter:TTransportFilter; ALock:Boolean; AState:LongWord):TTransportFilter;
Description: To be documented
Note None documented


function TNetworkTransport.GetFilterByNext(APrevious:TTransportFilter; ALock,AUnlock:Boolean; AState:LongWord):TTransportFilter;
Description: To be documented
Note None documented


function TNetworkTransport.GetConfigByHandle(AHandle:THandle; ALock:Boolean; AState:LongWord):TTransportConfig;
Description: To be documented
Note None documented


function TNetworkTransport.GetConfigByType(AConfigType:Word; ALock:Boolean; AState:LongWord):TTransportConfig;
Description: To be documented
Note None documented


function TNetworkTransport.GetConfigByConfig(AConfig:TTransportConfig; ALock:Boolean; AState:LongWord):TTransportConfig;
Description: To be documented
Note None documented


function TNetworkTransport.GetConfigByNext(APrevious:TTransportConfig; ALock,AUnlock:Boolean; AState:LongWord):TTransportConfig;
Description: To be documented
Note None documented


function TNetworkTransport.AddAdapter(AAdapter:TNetworkAdapter; AConfigType:Word; AAddress,ANetmask,AGateway,AServer:Pointer):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.RemoveAdapter(AAdapter:TNetworkAdapter):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.AddProtocol(AProtocol:Word; APacketHandler:TTransportPacketHandler; AControlHandler:TTransportControlHandler):THandle;
Description: To be documented
Note None documented


function TNetworkTransport.RemoveProtocol(AHandle:THandle; AProtocol:Word):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.AddFilter(AProtocol:Word; AFilterHandler:TTransportFilterHandler):THandle;
Description: To be documented
Note None documented


function TNetworkTransport.RemoveFilter(AHandle:THandle; AProtocol:Word):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.AddConfig(AConfigType:Word; AConfigAuto:Boolean; AConfigHandler:TTransportConfigHandler):THandle;
Description: To be documented
Note None documented


function TNetworkTransport.RemoveConfig(AHandle:THandle; AConfigType:Word):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.StartTransport:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.StopTransport:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.ProcessTransport:Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.BindTransport(AAdapter:TNetworkAdapter):Boolean;
Description: To be documented
Note None documented


function TNetworkTransport.UnbindTransport(AAdapter:TNetworkAdapter):Boolean;
Description: To be documented
Note None documented


Return to Unit Reference