mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-12 19:57:55 +08:00
20 lines
276 B
Go
20 lines
276 B
Go
package net
|
|
|
|
import (
|
|
"io"
|
|
|
|
corenet "github.com/ipfs/go-ipfs/corenet"
|
|
)
|
|
|
|
func startStreaming(stream *corenet.StreamInfo) {
|
|
go func() {
|
|
io.Copy(stream.Local, stream.Remote)
|
|
stream.Close()
|
|
}()
|
|
|
|
go func() {
|
|
io.Copy(stream.Remote, stream.Local)
|
|
stream.Close()
|
|
}()
|
|
}
|