Fix missing HandshakeConn interface

This commit is contained in:
世界 2023-08-11 19:19:55 +08:00
parent ea4a972acd
commit dc1639b520
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
3 changed files with 28 additions and 0 deletions

View file

@ -20,6 +20,10 @@ type clientConn struct {
responseRead bool
}
func (c *clientConn) NeedHandshake() bool {
return !c.requestWritten
}
func (c *clientConn) readResponse() error {
response, err := ReadStreamResponse(c.Conn)
if err != nil {
@ -94,6 +98,10 @@ type clientPacketConn struct {
responseRead bool
}
func (c *clientPacketConn) NeedHandshake() bool {
return !c.requestWritten
}
func (c *clientPacketConn) readResponse() error {
response, err := ReadStreamResponse(c.ExtendedConn)
if err != nil {
@ -276,6 +284,10 @@ type clientPacketAddrConn struct {
responseRead bool
}
func (c *clientPacketAddrConn) NeedHandshake() bool {
return !c.requestWritten
}
func (c *clientPacketAddrConn) readResponse() error {
response, err := ReadStreamResponse(c.ExtendedConn)
if err != nil {