增加websocket支持
This commit is contained in:
		
							
								
								
									
										10
									
								
								vendor/github.com/jackc/pgx/v5/pgproto3/authentication_sasl.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/github.com/jackc/pgx/v5/pgproto3/authentication_sasl.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -47,8 +47,10 @@ func (dst *AuthenticationSASL) Decode(src []byte) error { | ||||
| } | ||||
|  | ||||
| // Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length. | ||||
| func (src *AuthenticationSASL) Encode(dst []byte) ([]byte, error) { | ||||
| 	dst, sp := beginMessage(dst, 'R') | ||||
| func (src *AuthenticationSASL) Encode(dst []byte) []byte { | ||||
| 	dst = append(dst, 'R') | ||||
| 	sp := len(dst) | ||||
| 	dst = pgio.AppendInt32(dst, -1) | ||||
| 	dst = pgio.AppendUint32(dst, AuthTypeSASL) | ||||
|  | ||||
| 	for _, s := range src.AuthMechanisms { | ||||
| @@ -57,7 +59,9 @@ func (src *AuthenticationSASL) Encode(dst []byte) ([]byte, error) { | ||||
| 	} | ||||
| 	dst = append(dst, 0) | ||||
|  | ||||
| 	return finishMessage(dst, sp) | ||||
| 	pgio.SetInt32(dst[sp:], int32(len(dst[sp:]))) | ||||
|  | ||||
| 	return dst | ||||
| } | ||||
|  | ||||
| // MarshalJSON implements encoding/json.Marshaler. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user