()
| 183 | } |
| 184 | |
| 185 | func ExampleConn_Request() { |
| 186 | nc, _ := nats.Connect(nats.DefaultURL) |
| 187 | defer nc.Close() |
| 188 | |
| 189 | nc.Subscribe("foo", func(m *nats.Msg) { |
| 190 | nc.Publish(m.Reply, []byte("I will help you")) |
| 191 | }) |
| 192 | nc.Request("foo", []byte("help"), 50*time.Millisecond) |
| 193 | } |
| 194 | |
| 195 | func ExampleConn_QueueSubscribe() { |
| 196 | nc, _ := nats.Connect(nats.DefaultURL) |