feat: framed fm for webshell (#411)

* feat: framed fm for webshell

* 1MB buffer
This commit is contained in:
UUBulb
2024-08-20 22:25:29 +08:00
committed by GitHub
parent 9c986d06cb
commit 47f8447a22
5 changed files with 698 additions and 4 deletions

View File

@@ -117,7 +117,7 @@ LOOP:
endCh := make(chan struct{})
go func() {
_, innerErr := io.Copy(stream.userIo, stream.agentIo)
_, innerErr := io.CopyBuffer(stream.userIo, stream.agentIo, make([]byte, 1048576))
if innerErr != nil {
err = innerErr
}
@@ -126,7 +126,7 @@ LOOP:
}
}()
go func() {
_, innerErr := io.Copy(stream.agentIo, stream.userIo)
_, innerErr := io.CopyBuffer(stream.agentIo, stream.userIo, make([]byte, 1048576))
if innerErr != nil {
err = innerErr
}