Remove unnecessary code in socks io

This commit is contained in:
V2Ray committed 2015-09-16 16:06:16 +02:00
1 parent 7cfcc58f19
commit 6746800a21
2 files changed
+2 -18

No files matched your search

+2 -6
View File
@@ -77,12 +77,8 @@ func NewAuthenticationResponse(authMethod byte) *Socks5AuthenticationResponse {
return response
}
func (r *Socks5AuthenticationResponse) ToBytes() []byte {
return []byte{r.version, r.authMethod}
}
func WriteAuthentication(writer io.Writer, response *Socks5AuthenticationResponse) error {
_, err := writer.Write(response.ToBytes())
func WriteAuthentication(writer io.Writer, r *Socks5AuthenticationResponse) error {
_, err := writer.Write([]byte{r.version, r.authMethod})
return err
}