mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 07:01:09 +00:00
Remove unnecessary code in socks io
This commit is contained in:
1 parent
7cfcc58f19
commit
6746800a21
2 files changed
+2
-18
No files matched your search
+2
-6
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user