pipe-io-server/clients/go/test.go

21 lines
260 B
Go
Raw Normal View History

package main
import (
"log"
"./pipeio"
)
func main() {
pipeio, err := pipeio.NewPipeIO("in", "out")
if err != nil {
log.Fatal(err)
}
defer pipeio.Close()
pipeio.HandleMessage(func(msg []byte) {
pipeio.Writer.SendMessage(msg)
})
pipeio.Run()
}