core

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoomModeEncoded       = 0
	RoomModeBroadcast     = 1
	RoomModePoll          = 2
	RoomModeBroadcastPoll = 3
)

Variables

View Source
var Debug = true

Functions

This section is empty.

Types

type Conn

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

type Options

type Options struct {
	ServerIdent string
	Syncer      sockdx.PeerSync
	SysHelper   sockdx.SystemHelper
	Logger      zerolog.Logger
}

type Sockd

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

func New

func New(opts sockdx.Options) *Sockd

func (*Sockd) LocalCloseRoom

func (s *Sockd) LocalCloseRoom(ns, room string) error

func (*Sockd) LocalKickRoomConn

func (s *Sockd) LocalKickRoomConn(ns, room string, cid int64) error

func (*Sockd) LocalListConns

func (s *Sockd) LocalListConns(ns string) (map[int64]string, error)

func (*Sockd) LocalListRoomConns

func (s *Sockd) LocalListRoomConns(ns, room string) (map[int64][]string, error)

func (*Sockd) NewConnection

func (s *Sockd) NewConnection(opts sockdx.ConnOptions) error

func (*Sockd) Poll

func (s *Sockd) Poll(ns, roomId string, max, min int64) (*sockdx.PollResponse, error)

func (*Sockd) RoomUpdateTags

func (s *Sockd) RoomUpdateTags(ns, roomId string, opts sockdx.UpdateTagOptions) error

func (*Sockd) SendBroadcast

func (s *Sockd) SendBroadcast(ns, room string, ignores []int64, payload []byte) error

func (*Sockd) SendDirect

func (s *Sockd) SendDirect(ns, room string, connId int64, payload []byte) error

func (*Sockd) SendDirectBatch

func (s *Sockd) SendDirectBatch(ns, room string, conns []int64, payload []byte) error

func (*Sockd) SendTagged

func (s *Sockd) SendTagged(ns, room string, tags []string, ignores []int64, payload []byte) error

Jump to

Keyboard shortcuts

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