tractor.dev/toolkit-go@v0.0.0-20241010005851-214d91207d07/duplex/mux/dial_io.go (about) 1 package mux 2 3 import ( 4 "io" 5 "os" 6 ) 7 8 // DialIO establishes a mux session using a WriterCloser and ReadCloser. 9 func DialIO(out io.WriteCloser, in io.ReadCloser) (Session, error) { 10 return New(&ioduplex{out, in}), nil 11 } 12 13 // DialIO establishes a mux session using Stdout and Stdin. 14 func DialStdio() (Session, error) { 15 return DialIO(os.Stdout, os.Stdin) 16 }