PingSequenceStart
extends SimpleSequenceStart
in package
Represents a sequence start value used in ping operations, incorporating two sequence numbers.
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructs a PingSequenceStart with specified initial values.
- fromPingValues() : PingSequenceStart
- Creates a PingSequenceStart from two given sequence values, calculating the main sequence start value.
- generate() : PingSequenceStart
- Generates a new PingSequenceStart with randomly determined sequence numbers.
- getSeq1() : int
- Retrieves the first supplementary sequence number.
- getSeq2() : int
- Retrieves the second supplementary sequence number.
- getValue() : int
- A value sent by the server to update the client's sequence start, also known as the 'starting counter ID'.
- zero() : SequenceStart
- Returns an instance of SequenceStart with a value of 0.
Properties
$seq1
private
int
$seq1
$seq2
private
int
$seq2
$value
private
int
$value
Methods
__construct()
Constructs a PingSequenceStart with specified initial values.
public
__construct(int $value, int $seq1, int $seq2) : mixed
Parameters
- $value : int
-
The main sequence start value.
- $seq1 : int
-
The first supplementary sequence number.
- $seq2 : int
-
The second supplementary sequence number.
fromPingValues()
Creates a PingSequenceStart from two given sequence values, calculating the main sequence start value.
public
static fromPingValues(int $seq1, int $seq2) : PingSequenceStart
Parameters
- $seq1 : int
-
The first sequence number.
- $seq2 : int
-
The second sequence number.
Return values
PingSequenceStart —Returns a new instance configured with the calculated sequence start value.
generate()
Generates a new PingSequenceStart with randomly determined sequence numbers.
public
static generate() : PingSequenceStart
Return values
PingSequenceStart —Returns a new instance with random sequence numbers.
getSeq1()
Retrieves the first supplementary sequence number.
public
getSeq1() : int
Return values
int —The first supplementary sequence number.
getSeq2()
Retrieves the second supplementary sequence number.
public
getSeq2() : int
Return values
int —The second supplementary sequence number.
getValue()
A value sent by the server to update the client's sequence start, also known as the 'starting counter ID'.
public
abstract getValue() : int
Return values
int —Returns the sequence start value.
zero()
Returns an instance of SequenceStart with a value of 0.
public
static zero() : SequenceStart
Return values
SequenceStart —An instance of SequenceStart.