channel

package
v0.0.0-...-b15c3c4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PescaChannel

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

PescaChannel is a basic channel for sending messages.

func CreateChannel

func CreateChannel() PescaChannel

CreateChannel creates a new channel.

func (*PescaChannel) Add

func (c *PescaChannel) Add(socket typings.GeneralSocket) error

Add a new socket to this channel.

func (*PescaChannel) Broadcast

func (c *PescaChannel) Broadcast(message events.MessageResponsePayload)

Broadcast a message to all sockets in this channel.

func (*PescaChannel) Remove

func (c *PescaChannel) Remove(id string)

Remove the socket with the given id from this channel.

Jump to

Keyboard shortcuts

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