Difference between revisions of "TTCPSendBuffer"

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 398: Line 398:
 
! Socket Timing
 
! Socket Timing
 
| For each sent segment a notification is scheduled for the socket thread to check the socket in TCP_RETRY_TIMEOUT[Segment.Count] milliseconds. This is to ensure that the segment is retried if not acknowledged by that time.
 
| For each sent segment a notification is scheduled for the socket thread to check the socket in TCP_RETRY_TIMEOUT[Segment.Count] milliseconds. This is to ensure that the segment is retried if not acknowledged by that time.
<br />
+
For each sent segment that has a following segment a notification is sent to the socket thread to check the socket immediately. This ensures that all acceptable segments are sent immediately.
<br />For each sent segment that has a following segment a notification is sent to the socket thread to check the socket immediately. This ensures that all acceptable segments are sent immediately.
+
 
<br />
 
<br />
 
<br />For each retried segment a notification is also scheduled for the socket thread to check the socket in TCP_RETRY_TIMEOUT[Segment.Count] milliseconds which will be the next retry time if still not acknowledged.
 
<br />For each retried segment a notification is also scheduled for the socket thread to check the socket in TCP_RETRY_TIMEOUT[Segment.Count] milliseconds which will be the next retry time if still not acknowledged.

Latest revision as of 01:48, 30 May 2018

Return to Unit TCP


Description


To be documented

Class definitions



[Expand]

TTCPSendBuffer = class(TSocketBuffer)


Function declarations



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


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


[Expand]
function TTCPSendBuffer.AddSegment(ASequence:LongWord; AFlags:Byte; ASize:Word):PTCPSegment;
Description: Adds a new Segment as the last segment in the list


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


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


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


[Expand]
function TTCPSendBuffer.CheckIdle:Boolean;
Description: Check if all data in the send buffer has been sent and acknowledged


[Expand]
function TTCPSendBuffer.SynAcknowledged:Boolean;
Description: Test if a SYN has been sent and if it has been ACKed


[Expand]
function TTCPSendBuffer.FinAcknowledged:Boolean;
Description: Test if a FIN has been sent and if it has been ACKed


[Expand]
function TTCPSendBuffer.TestAcknowledge(AAcknowledge:LongWord):Boolean;
Description: Tests an Acknowledge for invalidity


[Expand]
function TTCPSendBuffer.CheckAcknowledge(AAcknowledge:LongWord):Boolean;
Description: Checks an Acknowledge for validity


[Expand]
function TTCPSendBuffer.ValidateAcknowledge(AAcknowledge:LongWord):Boolean;
Description: Checks an Acknowledge for validity


[Expand]
function TTCPSendBuffer.WriteData(var ABuffer; ASize,AFlags:Integer):Boolean;
Description: Used by Send/SendTo to Write data into the buffer ready for Sending


[Expand]
function TTCPSendBuffer.Finish:Boolean;
Description: To be documented


[Expand]
function TTCPSendBuffer.Synchronize:Boolean;
Description: To be documented


[Expand]
function TTCPSendBuffer.ReadSegment(var ASequence:LongWord; var AUrgent:Word; var AFlags:Byte; var AData:Pointer; var ASize:Word; AForce:Boolean):Boolean;
Description: Used by Socket to Read segments to be (re)sent from queue


[Expand]
function TTCPSendBuffer.AcknowledgeSegments(ASequence,AAcknowledge:LongWord; AWindow:Word):Boolean;
Description: Used by Socket to Acknowledge segments that have been sent and update the Window


[Expand]
function TTCPSendBuffer.TimestampSegment(AOptions:Pointer; var AOffset:Word):Boolean;
Description: Used by Socket to Timestamp (RTT) segments that have been sent


[Expand]
function TTCPSendBuffer.SelectiveAckSegments(AOptions:Pointer; var AOffset:Word; ASize:Byte):Boolean;
Description: Used by Socket to Selective Ack segments that have been sent


Return to Unit Reference