coco

package
v0.0.0-...-63a9e4b Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DemoLoginReq = v10.LoginReq{UserInfo: &v10.UserInfo{Phone: "13333333333", Pass: "123456"},
		Device: &v10.Device{SystemOs: "IOS", SystemVersion: "IOS12", Model: "iPhoneXr",
			Nickname: "Tom的手机", Unique: "sasjliuygt6789uiojkhgvfc^&rt5y67"}}

	Demo1LoginReq = v10.LoginReq{UserInfo: &v10.UserInfo{Phone: "15888888888", Pass: "111111"},
		Device: &v10.Device{SystemOs: "IOS", SystemVersion: "IOS12", Model: "iPhoneXr",
			Nickname: "Alice 的手机", Unique: "466BEC55-AC8E-42BD-B7D6-3691C9B9842F"}}
	Demo2LoginReq = v10.LoginReq{UserInfo: &v10.UserInfo{Phone: "15888888888", Pass: "111111"},
		Device: &v10.Device{SystemOs: "Windows", SystemVersion: "10", Model: "WINX",
			Nickname: "Alice 的PC", Unique: "05ACCC2A-DB42-49AC-AA44-031D6FAC198B"}}
	Demo3LoginReq = v10.LoginReq{UserInfo: &v10.UserInfo{Phone: "15888888888", Pass: "111111"},
		Device: &v10.Device{SystemOs: "macOS", SystemVersion: "11", Model: "macOS",
			Nickname: "Alice 的MAC", Unique: "23F480F1-FCA2-4F32-94F8-58E96E0F5F20"}}

	Demo4LoginReq = v10.LoginReq{UserInfo: &v10.UserInfo{Phone: "17111111111", Pass: "000000"},
		Device: &v10.Device{SystemOs: "IOS", SystemVersion: "IOS10", Model: "iPhone8",
			Nickname: "Bob 的手机", Unique: "BDBD6C43-2D52-4627-B773-D52FB495B465"}}
	Demo5LoginReq = v10.LoginReq{UserInfo: &v10.UserInfo{Phone: "18333333333", Pass: "123456"},
		Device: &v10.Device{SystemOs: "IOS", SystemVersion: "IOS11", Model: "iPhone9",
			Nickname: "Tom 的手机", Unique: "FA8C9D83-FF44-410A-88E0-F427CCE34923"}}

	DemoLoginRequests = map[*v10.LoginReq]bool{
		&DemoLoginReq:  false,
		&Demo1LoginReq: false,
		&Demo2LoginReq: false,
		&Demo3LoginReq: false,
		&Demo4LoginReq: false,
		&Demo5LoginReq: false,
	}
)

Functions

func ClientSend

func ClientSend(name string, callback func(c *GrpcClient, uit *v10.UserInfoToken))

func ClientSendUnique

func ClientSendUnique(name string, callback func(c *GrpcClient, uit *v10.UserInfoToken))

func Deregister

func Deregister()

func GrpcStartClient

func GrpcStartClient()

func GrpcStopClient

func GrpcStopClient()

func PrintVersion

func PrintVersion()

func RealMain

func RealMain()

func SetMaxMessageSize

func SetMaxMessageSize(n int)

func WsClientAddNew

func WsClientAddNew()

func WsStart

func WsStart()

func WsStop

func WsStop()

Types

type ClientHub

type ClientHub struct {
	// contains filtered or unexported fields
}

func (*ClientHub) CloseClient

func (h *ClientHub) CloseClient(client *GrpcClient)

func (*ClientHub) QueryForClient

func (h *ClientHub) QueryForClient(client *GrpcClient, s string)

type GrpcClient

type GrpcClient struct {
	// contains filtered or unexported fields
}

func (*GrpcClient) DoClose

func (c *GrpcClient) DoClose()

func (*GrpcClient) Query

func (c *GrpcClient) Query(name string)

func (*GrpcClient) RequestClose

func (c *GrpcClient) RequestClose()

type PullMessages

type PullMessages struct {
	// contains filtered or unexported fields
}

type WsClient

type WsClient struct {
	IsReady           bool
	ReconnectDuration time.Duration
	// contains filtered or unexported fields
}

func (*WsClient) Close

func (c *WsClient) Close()

func (*WsClient) CloseFully

func (c *WsClient) CloseFully()

func (*WsClient) CloseNoReconnect

func (c *WsClient) CloseNoReconnect()

func (*WsClient) Init

func (c *WsClient) Init() error

func (*WsClient) Open

func (c *WsClient) Open()

func (*WsClient) Reconnect

func (c *WsClient) Reconnect()

type WsHub

type WsHub struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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