serverprocess

package
v0.0.0-...-53bbbcf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChoiceTwo

func ChoiceTwo(r redis.Conn, conn net.Conn)

func GetOnlineId

func GetOnlineId(conn net.Conn) (id int)

func Main

func Main(mes string, conn net.Conn, err error, r redis.Conn)

func ManOne

func ManOne(conn net.Conn, err error)

func SentOnline

func SentOnline(conn net.Conn)

func SetExitMsg

func SetExitMsg(id int)

func UserExit

func UserExit(conn net.Conn)

Types

type UserLoginMsg

type UserLoginMsg struct {
	Id         int      `json:"id"`
	UserStatus int      `json:"user_status"`
	Conn       net.Conn `json:"conn"`
}

func LoginPro

func LoginPro(conn net.Conn) (*UserLoginMsg, int)

读取登录信息

type UserMsg

type UserMsg struct {
	// contains filtered or unexported fields
}
var Usg *UserMsg

func (*UserMsg) AddOnlineUser

func (u *UserMsg) AddOnlineUser(ul *UserLoginMsg)

添加在线用户

func (*UserMsg) DelOnlineUer

func (u *UserMsg) DelOnlineUer(id int)

删除

func (*UserMsg) GetOnlineUser

func (u *UserMsg) GetOnlineUser() map[int]*UserLoginMsg

返回当前在线用户

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL