(req p2pRequest)
| 204 | } |
| 205 | |
| 206 | func (c *client) send(req p2pRequest) { |
| 207 | go func() { |
| 208 | select { |
| 209 | case <-c.ctx.Done(): |
| 210 | default: |
| 211 | if err := req.sendReq(c.peerSend); err != nil { |
| 212 | req.replyResult(nil, errors.Errorf("client send: %w", err)) |
| 213 | } |
| 214 | } |
| 215 | }() |
| 216 | } |
| 217 | |
| 218 | func (c *client) encryptPipe(plaintext chan []byte) (out chan []byte) { |
| 219 | out = make(chan []byte) |