Difference between revisions of "TTCPRecvBuffer"

From Ultibo.org
Jump to: navigation, search
 
Line 224: Line 224:
 
! Length
 
! Length
 
| Length includes the control bits
 
| Length includes the control bits
|-
 
! Matching Conditions
 
| Segment |------|
 
1 Match . |--| . First <= Seqeuence and Last >= Sequence + Length
 
<br />2 Match |------| First <= Seqeuence and Last >= Sequence + Length
 
<br />3 No Match |----------|
 
<br />4 No Match . |------|
 
<br />5 No Match |------| .
 
<br />6 No Match |----| .
 
<br />7 No Match . |----|
 
 
|-
 
|-
 
|}
 
|}
Line 252: Line 242:
 
! Note
 
! Note
 
| If no Segment is after the passed Sequence returns the last Segment
 
| If no Segment is after the passed Sequence returns the last Segment
|-
 
! Matching Conditions
 
| Segment |------|
 
1 Match |--| .  Sequence + Length <= First
 
<br />2 Match |--| . . Sequence + Length <= First
 
<br />3 No Match |-------| .
 
<br />4 No Match |-------|
 
<br />5 No Match . |-------|
 
<br />6 No Match . |-------|
 
 
|-
 
|-
 
|}
 
|}
Line 276: Line 257:
 
! Length
 
! Length
 
| Length includes the control bits
 
| Length includes the control bits
|-
 
! Matching Conditions
 
| 1 Match |----------| Seqeuence <= First and Sequence + Length >= Last
 
2 Match |------| . Sequence + Length > First and Sequence + Length <= Last
 
<br />3 Match . |------| Sequence >= First and Sequence < Last
 
<br />
 
<br />4 No Match . |--| . Matched by GetSegment
 
<br />5 Match |------| Matched by GetSegment (Also Matches 1)
 
<br />6 Match |--------| Matched by 1
 
<br />7 Match |--------| Matched by 1
 
<br />8 Match |----| . Matched by 2 (Also Matches 3)
 
<br />9 Match . |----| Matched by 3 (Also Matches 2)
 
<br />10 No Match . |------|
 
<br />11 No Match . .  |------|
 
 
|-
 
|-
 
|}
 
|}

Latest revision as of 02:00, 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