Difference between revisions of "TTCPRecvBuffer"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit TCP __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collapsed"...")
 
Line 447: Line 447:
 
|-
 
|-
 
! Overlap Handling
 
! Overlap Handling
| Segment |------|                                                       
+
| 1 Entire |----------| Seqeuence <= First and Sequence + Length >= Last     
1 Entire |----------| Seqeuence <= First and Sequence + Length >= Last     
+
2 Left . |------| Sequence > First and Sequence + Length > Last       
<br />2 Left . |------| Sequence > First and Sequence + Length > Last       
+
 
<br />3 Right |------| . Sequence < First and Sequence + Length < Last       
 
<br />3 Right |------| . Sequence < First and Sequence + Length < Last       
 
<br />4 Within . |--| . Seqeuence >= First and Sequence + Length <= Last     
 
<br />4 Within . |--| . Seqeuence >= First and Sequence + Length <= Last     

Revision as of 01:52, 30 May 2018

Return to Unit TCP


Description


To be documented

Class definitions



[Expand]

TTCPRecvBuffer = class(TSocketBuffer)


Function declarations



[Expand]
constructor TTCPRecvBuffer.Create;
Description: To be documented


[Expand]
destructor TTCPRecvBuffer.Destroy;
Description: To be documented


[Expand]
function TTCPRecvBuffer.DelayOverride(ASegment:PTCPSegment):Boolean;
Description: Checks if this segment can override delayed ack because it has an in sequence segment following it


[Expand]
function TTCPRecvBuffer.GetSegment(ASequence:LongWord; ALength:Word):PTCPSegment;
Description: Returns the first Segment that contains ALL of the passed Sequence


[Expand]
function TTCPRecvBuffer.GetPrevious(ASequence:LongWord; ALength:Word):PTCPSegment;
Description: Finds the first Segment that is AFTER the passed Sequence and returns the previous Segment


[Expand]
function TTCPRecvBuffer.GetOverlapped(ASequence:LongWord; ALength:Word):PTCPSegment;
Description: Returns the first Segment that overlaps ANY of the passed Sequence


[Expand]
function TTCPRecvBuffer.AddSegment(APrev:PTCPSegment; ASequence:LongWord; AFlags:Byte; ASize:Word):PTCPSegment;
Description: Adds a new Segment after the previous segment or first in the list


[Expand]
function TTCPRecvBuffer.RemoveSegment(ASegment:PTCPSegment):Boolean;
Description: Removes the passed Segment from the list


[Expand]
procedure TTCPRecvBuffer.FlushSegments(All:Boolean);
Description: Removes Read Segments from the buffer (or All)


[Expand]
procedure TTCPRecvBuffer.SetSize(ASize:LongWord);
Description: To be documented


[Expand]
function TTCPRecvBuffer.CheckIdle:Boolean;
Description: Check if all data in the recv buffer has been acknowledged


[Expand]
function TTCPRecvBuffer.GetUrgent:LongWord;
Description: To be documented


[Expand]
function TTCPRecvBuffer.GetAvailable:LongWord;
Description: To be documented


[Expand]
function TTCPRecvBuffer.SynReceived:Boolean;
Description: Checks if a SYN has been received from the Remote


[Expand]
function TTCPRecvBuffer.FinReceived:Boolean;
Description: Checks if a FIN has been received from the Remote


[Expand]
function TTCPRecvBuffer.CheckSequence(ASequence:LongWord; ASize:Word):Boolean;
Description: Checks a Sequence for validity


[Expand]
function TTCPRecvBuffer.ReadData(var ABuffer; var ASize:Integer; AFlags:Integer):Boolean;
Description: Used by Recv/RecvFrom to Read data from the buffer that has been Received


[Expand]
function TTCPRecvBuffer.WriteSegment(ASequence:LongWord; AUrgent:Word; AFlags:Byte; AData:Pointer; ASize:Word):Boolean;
Description: Used by Socket to Write segments that are received into the queue


[Expand]
function TTCPRecvBuffer.AcknowledgeSegments(var AAcknowledge:LongWord; var AWindow:Word; AForce:Boolean):Boolean;
Description: Used by Socket to Acknowledge segments that are received into the queue


[Expand]
function TTCPRecvBuffer.TimestampSegment(AOptions:Pointer; var AOffset:Word):Boolean;
Description: Used by Socket to Timestamp (RTT) segments that are received into the queue


[Expand]
function TTCPRecvBuffer.SelectiveAckSegments(AOptions:Pointer; var AOffset:Word):Boolean;
Description: To be documented


Return to Unit Reference