╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ serve_ssh_protocol.zig ───────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1770 if (ch.local_window >= initial_recv_window / 2) return; 1771 const add = initial_recv_window - ch.local_window; 1772 ch.local_window += add; 1773 var adj: std.ArrayList(u8) = .empty; 1774 defer adj.deinit(allocator); 1775 try adj.append(allocator, SSH_MSG_CHANNEL_WINDOW_ADJUST); 1776 try writeU32(&adj, allocator, ch.remote_id); 1777 try writeU32(&adj, allocator, add); 1778 try sc_cipher.writePacket(io, allocator, writer, adj.items); 1779 } 1780 1781 pub fn writeU32(buf: *std.ArrayList(u8), allocator: std.mem.Allocator, value: u32) !void { 1782 var bytes: [4]u8 = undefined; 1783 std.mem.writeInt(u32, &bytes, value, .big); 1784 try buf.appendSlice(allocator, &bytes); 1785 } 1786