上一个commit修改了函数签名,不好,太笨,还是不改好

proxy.Server返回的 *bytes.Buffer只被用于Fallback,所以直接放到Fallback里就行
This commit is contained in:
hahahrfool
2022-03-16 08:19:09 +08:00
parent 861d5a74c5
commit fa1c5db1ef
7 changed files with 53 additions and 39 deletions

View File

@@ -91,7 +91,6 @@ ws和grpc文件夹第七层
package proxy
import (
"bytes"
"fmt"
"io"
"net"
@@ -256,7 +255,7 @@ type Server interface {
Name() string
Handshake(underlay net.Conn) (io.ReadWriter, *bytes.Buffer, *Addr, error)
Handshake(underlay net.Conn) (io.ReadWriter, *Addr, error)
Stop()
CanFallback() bool //如果能fallback则handshake失败后会专门返回 ErrFallback