Low level setup for structs, etc
()
| 2685 | |
| 2686 | // Low level setup for structs, etc |
| 2687 | func (nc *Conn) setup() { |
| 2688 | nc.subs = make(map[int64]*Subscription) |
| 2689 | nc.pongs = make([]chan struct{}, 0, 8) |
| 2690 | |
| 2691 | nc.fch = make(chan struct{}, flushChanSize) |
| 2692 | nc.rqch = make(chan struct{}) |
| 2693 | |
| 2694 | // Setup scratch outbound buffer for PUB/HPUB |
| 2695 | pub := nc.scratch[:len(_HPUB_P_)] |
| 2696 | copy(pub, _HPUB_P_) |
| 2697 | } |
| 2698 | |
| 2699 | // tlsHandshakeEOF wraps an error with context when it occurs right after |
| 2700 | // a completed TLS handshake, which typically indicates the remote side |