1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-30 07:46:41 -04:00

use NewAuthenticationResponse instead of struct{}

This commit is contained in:
V2Ray 2015-09-16 17:36:11 +02:00
parent d18d3db4b5
commit 8f93612dec

View File

@ -40,10 +40,7 @@ func TestAuthenticationRequestRead(t *testing.T) {
func TestAuthenticationResponseWrite(t *testing.T) { func TestAuthenticationResponseWrite(t *testing.T) {
assert := unit.Assert(t) assert := unit.Assert(t)
response := Socks5AuthenticationResponse{ response := NewAuthenticationResponse(byte(0x05))
version: socksVersion,
authMethod: byte(0x05),
}
buffer := bytes.NewBuffer(make([]byte, 0, 10)) buffer := bytes.NewBuffer(make([]byte, 0, 10))
WriteAuthentication(buffer, &response) WriteAuthentication(buffer, &response)