1
0
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:
Darien Raymond
2017-02-06 15:36:55 +01:00
parent 2897df5a7a
commit d27743b3b9
5 changed files with 663 additions and 148 deletions

View File

@@ -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])