Exemple #1
0
func (c *Conn) write(f *plan9.Fcall) error {
	if err := c.getErr(); err != nil {
		return err
	}
	err := plan9.WriteFcall(c.rwc, f)
	if err != nil {
		c.setErr(err)
	}
	return err
}
Exemple #2
0
// Read calls from input and write them to out
func writeFCall(out io.Writer, done chan signal, err chan error, input chan *plan9.Fcall) {
loop:
	for {
		select {
		case <-done:
			break loop
		case fc := <-input:
			if fc == nil {
				continue
			}
			e := plan9.WriteFcall(out, fc)
			if e != nil {
				err <- e
				break
			}
		}
	}
}