ws

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: LGPL-2.1 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubescriptionRequest client.RequestType = "WRITE:__subscribe__"
)

Variables

This section is empty.

Functions

func MsgUnpackWsPayload added in v1.4.0

func MsgUnpackWsPayload(data []byte, p *WsPayload) error

Types

type Flag

type Flag string

type WsPayload added in v1.4.0

type WsPayload struct {
	Id            string                 `json:"id"`
	RequestType   client.RequestType     `json:"rTy"`
	Params        map[string]interface{} `json:"params"`
	ClientPayload entities.ClientPayload `json:"pl"`
}

func (*WsPayload) MsgPack added in v1.4.0

func (p *WsPayload) MsgPack() ([]byte, error)

type WsService

type WsService struct {
	Ctx *context.Context
	Cfg *configs.MainConfiguration
	// ClientHandshakeChannel    *chan *entities.ClientHandshake
	// ClientSubscriptionChannel *chan *entities.ClientWsSubscription
	RequestProcess *client.ClientRequestProcessor
}

func NewWsService

func NewWsService(mainCtx *context.Context) *WsService

func (*WsService) HandleConnection added in v1.4.0

func (p *WsService) HandleConnection(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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