connectionservice

package
v0.0.0-...-dfd90ba Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(log *zap.Logger) *Service

func (*Service) AddConnection

func (serv *Service) AddConnection(userID int, conn *ws.Conn)

func (*Service) Broadcast

func (serv *Service) Broadcast(response any, userID int) error

Broadcast отправляет сообщение всем соединениям пользователя

func (*Service) RemoveConnection

func (serv *Service) RemoveConnection(userID int, conn *ws.Conn)

Jump to

Keyboard shortcuts

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