Fix slow exchanges on linux by adding polling and other improvements (#14)

* add prints to investigate slowness

* add loop sleep for blocking Stack

* add connection close http attribute and detect end of HTML page

* add timeout to bridge read

* examples/xnet: add ntp timestamp to prints and show output in readme

* add polling to http tap interface

* more digits in ntp format

* prevent crashes on non-8 timestamp
This commit is contained in:
Pat Whittingslow
2026-01-01 09:35:35 -03:00
committed by GitHub
parent 3cbef6fa92
commit f8166aea05
9 changed files with 297 additions and 36 deletions
+5 -4
View File
@@ -671,6 +671,7 @@ const (
// FieldClassBinaryText represents long stretches of binary data such as BOOTP DHCPv4 field.
FieldClassBinaryText // binary-text
FieldClassOperation // op
FieldClassTimestamp // timestamp
)
const octet = 8
@@ -1058,25 +1059,25 @@ var baseNTPFields = [...]FrameField{
},
{
Name: "Reference Time",
Class: FieldClassText,
Class: FieldClassTimestamp,
FrameBitOffset: 16 * octet,
BitLength: 8 * octet,
},
{
Name: "Origin Time",
Class: FieldClassText,
Class: FieldClassTimestamp,
FrameBitOffset: 24 * octet,
BitLength: 8 * octet,
},
{
Name: "Receive Time",
Class: FieldClassText,
Class: FieldClassTimestamp,
FrameBitOffset: 32 * octet,
BitLength: 8 * octet,
},
{
Name: "Transit Time",
Class: FieldClassText,
Class: FieldClassTimestamp,
FrameBitOffset: 40 * octet,
BitLength: 8 * octet,
},