mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-29 01:06:35 +08:00
升级Go版本为v1.18
This commit is contained in:
@@ -8,6 +8,7 @@ type BaseClientConn struct {
|
||||
rawConn net.Conn
|
||||
|
||||
isBound bool
|
||||
userId int64
|
||||
serverId int64
|
||||
remoteAddr string
|
||||
|
||||
@@ -46,6 +47,16 @@ func (this *BaseClientConn) ServerId() int64 {
|
||||
return this.serverId
|
||||
}
|
||||
|
||||
// SetUserId 设置所属服务的用户ID
|
||||
func (this *BaseClientConn) SetUserId(userId int64) {
|
||||
this.userId = userId
|
||||
}
|
||||
|
||||
// UserId 获取当前连接所属服务的用户ID
|
||||
func (this *BaseClientConn) UserId() int64 {
|
||||
return this.userId
|
||||
}
|
||||
|
||||
// RawIP 原本IP
|
||||
func (this *BaseClientConn) RawIP() string {
|
||||
ip, _, _ := net.SplitHostPort(this.rawConn.RemoteAddr().String())
|
||||
|
||||
Reference in New Issue
Block a user