cloneMsgArg is used when the split buffer scenario has the pubArg in the existing read buffer, but we need to hold onto it into the next read.
()
| 420 | // cloneMsgArg is used when the split buffer scenario has the pubArg in the existing read buffer, but |
| 421 | // we need to hold onto it into the next read. |
| 422 | func (nc *Conn) cloneMsgArg() { |
| 423 | nc.ps.argBuf = nc.ps.scratch[:0] |
| 424 | nc.ps.argBuf = append(nc.ps.argBuf, nc.ps.ma.subject...) |
| 425 | nc.ps.argBuf = append(nc.ps.argBuf, nc.ps.ma.reply...) |
| 426 | nc.ps.ma.subject = nc.ps.argBuf[:len(nc.ps.ma.subject)] |
| 427 | if nc.ps.ma.reply != nil { |
| 428 | nc.ps.ma.reply = nc.ps.argBuf[len(nc.ps.ma.subject):] |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | const argsLenMax = 4 |
| 433 |