func (s *DeadlineStream) WriteJSON(v interface{}) error {
	// This uses a real clock rather than trying to use a clock passed
	// in because the websocket will use a real clock to determine
	// whether the deadline has passed anyway.
	deadline := time.Now().Add(s.Timeout)
	if err := s.Conn.SetWriteDeadline(deadline); err != nil {
		return errors.Annotate(err, "setting write deadline")
	}
	return errors.Trace(s.Conn.WriteJSON(v))
}
// WriteJSON is part of base.Stream.
WriteJSON is part of base.Stream.
// WriteJSON is part of base . Stream .
func (s *DeadlineStream) WriteJSON(v interface{}) error {
	deadline := time.Now().Add(s.Timeout)
	if err := s.Conn.SetWriteDeadline(deadline); err != nil {
		return errors.Annotate(err, "setting write deadline")
	}
	return errors.Trace(s.Conn.WriteJSON(v))
}
func ( s * DeadlineStream ) WriteJSON ( v interface { } ) error { deadline := time . Now ( ) . Add ( s . Timeout ) if err := s . Conn . SetWriteDeadline ( deadline ) ; err != nil { return errors . Annotate ( err , " " ) } return errors . Trace ( s . Conn . WriteJSON ( v ) ) }
WriteJSON is part of base.Stream.
WriteJSON is part of base . Stream .
// This uses a real clock rather than trying to use a clock passed // in because the websocket will use a real clock to determine // whether the deadline has passed anyway.