2
0

Add PgConn.SyncConn

This provides a way to ensure it is safe to directly read or write to
the underlying net.Conn.

https://github.com/jackc/pgx/issues/1673
This commit is contained in:
Jack Christensen
2023-07-08 16:46:38 -05:00
committed by Jack Christensen
parent 05440f9d3f
commit f512b9688b
4 changed files with 63 additions and 24 deletions
+4
View File
@@ -361,3 +361,7 @@ func (f *Frontend) findAuthenticationMessageType(src []byte) (BackendMessage, er
func (f *Frontend) GetAuthType() uint32 {
return f.authType
}
func (f *Frontend) ReadBufferLen() int {
return f.cr.wp - f.cr.rp
}