Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
f057f10a
Commit
f057f10a
authored
12 years ago
by
echicken
Browse files
Options
Downloads
Patches
Plain Diff
Alleged flow-control improvements.
parent
19560e2a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/kissAX25lib.js
+16
-6
16 additions, 6 deletions
exec/load/kissAX25lib.js
with
16 additions
and
6 deletions
exec/load/kissAX25lib.js
+
16
−
6
View file @
f057f10a
...
...
@@ -114,7 +114,7 @@
'information'
The payload if applicable (I or UI frames only,) good for use
with byteArrayToString(s)
'clientID'
A unique ID for the sender or recipient, for internal use
...
...
@@ -174,6 +174,11 @@
'reject'
true/false, for internal use
'wait'
If true, do not send any additional I frames to this client. (Your
scripts should check this value before deciding to send data to
the client.)
'connected'
true/false, whether or not this client is connected
...
...
@@ -476,6 +481,7 @@ function ax25Client(destination, destinationSSID, source, sourceSSID, k) {
this
.
t3
=
0
;
// Timer T3
this
.
resend
=
false
;
this
.
reject
=
false
;
this
.
wait
=
false
;
this
.
connected
=
false
;
this
.
sentIFrames
=
[];
this
.
lastPacket
=
false
;
...
...
@@ -541,11 +547,11 @@ function ax25Client(destination, destinationSSID, source, sourceSSID, k) {
}
else
if
((
p
.
control
&
S_FRAME
)
==
S_FRAME
)
{
// This is a Receive-Ready and an acknowledgement of all frames in the sequence up to client's N(R)
this
.
nr
=
p
.
nr
;
if
(
p
.
nr
==
7
&&
this
.
sentIFrames
.
length
==
7
)
{
this
.
sentIFrames
=
[];
// Client acknowledges the entire sequence, we can ditch our stored sent packets
return
retval
;
}
else
if
(
p
.
nr
==
7
&&
this
.
sentIFrames
.
length
>
7
)
{
this
.
sentIFrames
=
this
.
sentIFrames
.
slice
(
7
);
// If we sent more I frames before they acknowledged our N(S)=7, we don't want to delete them yet.
if
(
this
.
ssv
<=
this
.
nr
%
8
)
this
.
wait
=
false
;
if
(
p
.
nr
==
7
&&
this
.
sentIFrames
.
length
>=
7
)
{
// Client acknowledges the entire sequence, we can ditch our stored sent packets
this
.
sentIFrames
=
this
.
sentIFrames
.
slice
(
7
);
return
retval
;
}
else
if
(
this
.
resend
&&
p
.
nr
<
this
.
sentIFrames
.
length
)
{
a
.
raw
=
this
.
sentIFrames
[
p
.
nr
-
1
];
...
...
@@ -558,6 +564,8 @@ function ax25Client(destination, destinationSSID, source, sourceSSID, k) {
}
else
if
((
p
.
control
&
I_FRAME
)
==
I_FRAME
)
{
this
.
ns
=
p
.
ns
;
this
.
nr
=
p
.
nr
;
if
(
this
.
ssv
<=
this
.
nr
%
8
)
this
.
wait
=
false
;
if
(
p
.
ns
!=
this
.
rsv
)
{
if
(
this
.
reject
)
return
retval
;
...
...
@@ -605,6 +613,8 @@ function ax25Client(destination, destinationSSID, source, sourceSSID, k) {
this
.
ssv
++
;
if
(
this
.
ssv
>
7
)
this
.
ssv
=
0
;
if
(
this
.
ssv
>
this
.
nr
%
8
)
this
.
wait
=
true
;
this
.
sentIFrames
.
push
(
a
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment