RequestWithContext takes a context, a subject and payload in bytes and request expecting a single response.
(ctx context.Context, subj string, data []byte)
| 34 | // RequestWithContext takes a context, a subject and payload |
| 35 | // in bytes and request expecting a single response. |
| 36 | func (nc *Conn) RequestWithContext(ctx context.Context, subj string, data []byte) (*Msg, error) { |
| 37 | return nc.requestWithContext(ctx, subj, nil, data) |
| 38 | } |
| 39 | |
| 40 | func (nc *Conn) requestWithContext(ctx context.Context, subj string, hdr, data []byte) (*Msg, error) { |
| 41 | if ctx == nil { |