Difference between revisions of "TIPBuffer"
From Ultibo.org
(Created page with "Return to Unit IP __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collapsed" s...") |
(No difference)
|
Latest revision as of 02:58, 22 May 2018
Return to Unit IP
Description
To be documented
Class definitions
TIPBuffer = class(TTransportBufferEx)
Note: Different to Socket Buffer. | |
constructor Create(ATransport:TNetworkTransport);
|
|
destructor Destroy; override;
|
|
private
| |
FFirst:PIPPacket;
|
|
FLast:PIPPacket;
|
|
function GetFragment(APacket:PIPPacket; AOffset,ASize:Word):PIPFragment;
|
|
function AddFragment(APacket:PIPPacket; AOffset,ASize:Word):PIPFragment;
|
|
function RemoveFragment(APacket:PIPPacket):Boolean;
|
|
procedure FlushFragments(APacket:PIPPacket);
|
|
public
| |
function GetPacket(AId:Word; AProtocol:Byte; const ASource,ADest:TInAddr; ALock:Boolean):PIPPacket;
|
|
function AddPacket(AId:Word; AProtocol:Byte; const ASource,ADest:TInAddr; ALock:Boolean):PIPPacket;
|
|
function RemovePacket(APacket:PIPPacket):Boolean;
|
|
function UnlockPacket(APacket:PIPPacket):Boolean;
|
|
procedure FlushPackets(All:Boolean);
|
|
function PutHeader(APacket:PIPPacket; ABuffer:Pointer; ALength:Word):Boolean;
|
|
function PutFragment(APacket:PIPPacket; ABuffer:Pointer; AOffset,ASize,AFlags:Word):Boolean;
|
Function declarations
constructor TIPBuffer.Create(ATransport:TNetworkTransport);
Description: To be documented
Note | None documented |
---|
destructor TIPBuffer.Destroy;
Description: To be documented
Note | None documented |
---|
function TIPBuffer.GetFragment(APacket:PIPPacket; AOffset,ASize:Word):PIPFragment;
Description: Gets the Fragment with matching Offset and Size if any
Note | Caller must hold the Packet lock |
---|
function TIPBuffer.AddFragment(APacket:PIPPacket; AOffset,ASize:Word):PIPFragment;
Description: Adds a new Fragment as the Last fragment in the Packet
Note | Caller must hold the Packet lock |
---|
function TIPBuffer.RemoveFragment(APacket:PIPPacket):Boolean;
Description: Removes the First fragment from the Packet
Note | Caller must hold the Packet lock |
---|
procedure TIPBuffer.FlushFragments(APacket:PIPPacket);
Description: Removes all fragments from the Packet
Note | Caller must hold the Packet lock |
---|
function TIPBuffer.GetPacket(AId:Word; AProtocol:Byte; const ASource,ADest:TInAddr; ALock:Boolean):PIPPacket;
Description: Gets the Packet with matching Id, Protocol, Source and Dest if any
Note | None documented |
---|
function TIPBuffer.AddPacket(AId:Word; AProtocol:Byte; const ASource,ADest:TInAddr; ALock:Boolean):PIPPacket;
Description: Adds a new Packet as the Last packet in the Buffer
Note | None documented |
---|
function TIPBuffer.RemovePacket(APacket:PIPPacket):Boolean;
Description: Removes the Packet from the Buffer and release the memory
Note | None documented |
---|
function TIPBuffer.UnlockPacket(APacket:PIPPacket):Boolean;
Description: Unlock the Packet previously locked by GetPacket or AddPacket
Note | None documented |
---|
procedure TIPBuffer.FlushPackets(All:Boolean);
Description: Removes either all packets or packets which have expired
Note | None documented |
---|
function TIPBuffer.PutHeader(APacket:PIPPacket; ABuffer:Pointer; ALength:Word):Boolean;
Description: Copies the Packet header from the Buffer to the Packet
Note | Caller must hold the Packet lock |
---|
function TIPBuffer.PutFragment(APacket:PIPPacket; ABuffer:Pointer; AOffset,ASize,AFlags:Word):Boolean;
Description: Creates a new Fragment and copies the data from the Buffer to the Packet
Note | Caller must hold the Packet lock |
---|
Return to Unit Reference