mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-27 04:25:44 -05:00
rewrite vmess test
This commit is contained in:
@@ -29,7 +29,7 @@ func xor(b []byte) []byte {
|
||||
}
|
||||
|
||||
func readFrom(conn net.Conn, timeout time.Duration, length int) []byte {
|
||||
b := make([]byte, 2048)
|
||||
b := make([]byte, length)
|
||||
deadline := time.Now().Add(timeout)
|
||||
conn.SetReadDeadline(deadline)
|
||||
n, _ := io.ReadFull(conn, b[:length])
|
||||
|
||||
Reference in New Issue
Block a user