network: Bug fixes

This commit is contained in:
2026-05-23 19:26:16 +02:00
parent 2e543db418
commit f524c94d8e
2 changed files with 59 additions and 25 deletions
+3 -1
View File
@@ -423,7 +423,9 @@ pub fn readSocket(self: *Node, handle: Handle, target: []u8) HandleError!usize {
return self.network_host.read(&desc.conn, target);
}
pub fn writeSocket(self: *Node, handle: Handle, source: []const u8) HandleError!usize {
pub const WriteSocketError = HandleError || Network.SendError;
pub fn writeSocket(self: *Node, handle: Handle, source: []const u8) WriteSocketError!usize {
self.scheduler.sleep(10);
const desc = try self.handleToDescOfType(handle, .conn);
return self.network_host.send(&desc.conn, source);