NewInbox will return an inbox string which can be used for directed replies from subscribers. These are guaranteed to be unique, but can be shared and subscribed to by others.
()
| 4717 | // subscribers. These are guaranteed to be unique, but can be shared and subscribed |
| 4718 | // to by others. |
| 4719 | func NewInbox() string { |
| 4720 | var b [inboxPrefixLen + nuidSize]byte |
| 4721 | pres := b[:inboxPrefixLen] |
| 4722 | copy(pres, InboxPrefix) |
| 4723 | ns := b[inboxPrefixLen:] |
| 4724 | copy(ns, nuid.Next()) |
| 4725 | return string(b[:]) |
| 4726 | } |
| 4727 | |
| 4728 | // Create a new inbox that is prefix aware. |
| 4729 | func (nc *Conn) NewInbox() string { |