refactor p2p: keepalive pings, WASM-safe messaging, non-blocking
connections
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
//! These functions handle file addition, sharing, downloading, and transfer message processing.
|
||||
|
||||
const std = @import("std");
|
||||
const platform_time = @import("platform").time;
|
||||
|
||||
// Core components (via module import)
|
||||
const core = @import("core");
|
||||
@@ -315,7 +316,7 @@ pub fn handleFileTransferMessageImpl(p2p: *P2P, peer_id: [32]u8, data: []const u
|
||||
.message_id = 0,
|
||||
.peer_id = &peer_id,
|
||||
.data = &reject_payload,
|
||||
.timestamp = std.time.timestamp(),
|
||||
.timestamp = platform_time.timestamp(),
|
||||
};
|
||||
if (fm.network_sender) |sender| {
|
||||
_ = sender.sendMessage(reject_msg) catch {};
|
||||
|
||||
Reference in New Issue
Block a user