From 6c45198ea89e76a2d03b8d5ff17071cc5b4148ce Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 8 Mar 2026 02:02:37 +0800 Subject: protocol/v0v1/server: Add FlushIO --- protocol/v0v1/server/session.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'protocol/v0v1/server') diff --git a/protocol/v0v1/server/session.go b/protocol/v0v1/server/session.go index 75884806..7e107f53 100644 --- a/protocol/v0v1/server/session.go +++ b/protocol/v0v1/server/session.go @@ -87,6 +87,15 @@ func (session *Session) WriteFlush() error { return session.enc.WriteFlush() } +// FlushIO flushes buffered transport output without emitting pkt-line frames. +func (session *Session) FlushIO() error { + if session.useSideBand { + return session.sideband.FlushIO() + } + + return session.enc.FlushIO() +} + // ProgressWriter returns one chunking writer for sideband progress output. // // When side-band-64k was not negotiated, writes are discarded. -- cgit v1.3.1-10-gc9f91