websocket

package
v6.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Kick

func Kick(uid string) (existed bool, err error)

Kick kicks the uid offline.

func Serve

func Serve(outerSrvCfg micro.SrvConfig, protoFunc erpc.ProtoFunc)

Serve starts websocket gateway service.

Types

type Gw

type Gw struct {
	erpc.CallCtx
}

Gw long connection controller.

func (*Gw) WsKick

func (g *Gw) WsKick(args *types.SocketKickArgs) (*types.SocketKickReply, *erpc.Status)

SocketKick kicks the uid offline.

func (*Gw) WsMpush

func (g *Gw) WsMpush(args *types.WsMpushArgs) (*types.WsMpushReply, *erpc.Status)

WsMpush multi-push messages to the specified users.

func (*Gw) WsPush

func (g *Gw) WsPush(args *types.WsPushArgs) (*types.WsPushReply, *erpc.Status)

WsPush pushes message to the specified user.

func (*Gw) WsTotal

func (g *Gw) WsTotal(*types.WsTotalArgs) (*types.WsTotalReply, *erpc.Status)

WsTotal returns the long connections total.

Jump to

Keyboard shortcuts

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