1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 12:35:21 -05:00

remove Port.Bytes()

This commit is contained in:
Darien Raymond
2018-11-02 15:14:34 +01:00
parent 58e2ed3381
commit ee489c95b3
3 changed files with 4 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ import (
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/common/vio"
)
var (
@@ -95,7 +96,7 @@ func (f *CommandSwitchAccountFactory) Marshal(command interface{}, writer io.Wri
common.Must2(writer.Write([]byte(hostStr)))
}
common.Must2(writer.Write(cmd.Port.Bytes(nil)))
common.Must2(vio.WriteUint16(writer, cmd.Port.Value()))
idBytes := cmd.ID.Bytes()
common.Must2(writer.Write(idBytes))