Function to init new response structures.
()
| 4740 | |
| 4741 | // Function to init new response structures. |
| 4742 | func (nc *Conn) initNewResp() { |
| 4743 | nc.respSubPrefix = fmt.Sprintf("%s.", nc.NewInbox()) |
| 4744 | nc.respSubLen = len(nc.respSubPrefix) |
| 4745 | nc.respSub = fmt.Sprintf("%s*", nc.respSubPrefix) |
| 4746 | nc.respMap = make(map[string]chan *Msg) |
| 4747 | nc.respRand = rand.New(rand.NewSource(time.Now().UnixNano())) |
| 4748 | } |
| 4749 | |
| 4750 | // newRespInbox creates a new literal response subject |
| 4751 | // that will trigger the mux subscription handler. |