2
0

Restructure sending messages

Use an internal buffer in pgproto3.Frontend and pgproto3.Backend instead
of directly writing to the underlying net.Conn. This will allow tracing
messages as well as simplify pipeline mode.
This commit is contained in:
Jack Christensen
2022-05-21 11:06:44 -05:00
parent 989a4835de
commit 5714896b10
9 changed files with 105 additions and 226 deletions
+2 -1
View File
@@ -97,7 +97,8 @@ type sendMessageStep struct {
}
func (e *sendMessageStep) Step(backend *pgproto3.Backend) error {
return backend.Send(e.msg)
backend.Send(e.msg)
return backend.Flush()
}
func SendMessage(msg pgproto3.BackendMessage) Step {