feat: add non-blocking NTCP2 sends and Firefox settings sync
- NTCP2: queue outbound data frames and flush them without blocking (send_blocks_nb, send_i2np_nb, flush_nonblocking) - NTCP2: bound write_all with a deadline and set TCP keepalive and user timeout on peer sockets - Firefox extension 0.1.3: save settings as a patch, keep unsaved form fields from being overwritten on refresh, add timeouts to router API calls, and honor the interceptTorrents toggle in the content script
This commit is contained in:
1 parent
82aaa9f11e
commit
9aa15f9ae8
18 files changed
+1323
-239
No files matched your search
@@ -247,7 +247,7 @@ fn Router::step_public_bootstrap(self : Router) -> Unit {
|
||||
if is_peer_in_list(p.hash, tunnel_peers) &&
|
||||
now_ms > p.last_active_ms + 90000UL {
|
||||
let ok = try {
|
||||
p.conn.send_blocks([@ntcp2.Ntcp2Block::Padding(b"\x00\x00\x00\x00")])
|
||||
p.conn.send_blocks_nb([@ntcp2.Ntcp2Block::Padding(b"\x00\x00\x00\x00")])
|
||||
true
|
||||
} catch {
|
||||
_ => false
|
||||
@@ -258,6 +258,9 @@ fn Router::step_public_bootstrap(self : Router) -> Unit {
|
||||
} else {
|
||||
p.conn.close()
|
||||
let _ = self.peers.remove(pi)
|
||||
if self.public_mode {
|
||||
self.mark_peer_failed(p.hash, 60000UL)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi += 1
|
||||
|
||||
Reference in new issue
Block a user