code: func (t *bufferedObjectStream) WriteObject(obj interface{}) error {
  	t.mu.Lock()
  	defer t.mu.Unlock()
  	if err := t.codec.WriteObject(t.w, obj); err != nil {
  		return err
  	}
  	return t.w.Flush()
  }
docs: // WriteObject implements ObjectStream.