SendClose sends a Close message to the backend (i.e. the server). The message is buffered until Flush is called. Any error encountered will be returned from Flush.
(msg *Close)
| 182 | // SendClose sends a Close message to the backend (i.e. the server). The message is buffered until Flush is called. Any |
| 183 | // error encountered will be returned from Flush. |
| 184 | func (f *Frontend) SendClose(msg *Close) { |
| 185 | if f.encodeError != nil { |
| 186 | return |
| 187 | } |
| 188 | |
| 189 | prevLen := len(f.wbuf) |
| 190 | newBuf, err := msg.Encode(f.wbuf) |
| 191 | if err != nil { |
| 192 | f.encodeError = err |
| 193 | return |
| 194 | } |
| 195 | f.wbuf = newBuf |
| 196 | |
| 197 | if f.tracer != nil { |
| 198 | f.tracer.traceClose('F', int32(len(f.wbuf)-prevLen), msg) |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | // SendDescribe sends a Describe message to the backend (i.e. the server). The message is buffered until Flush is |
| 203 | // called. Any error encountered will be returned from Flush. |
no test coverage detected