websocket

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotifyPlaylistSubscribers

func NotifyPlaylistSubscribers(fromUser uint, playlist_id uint, message string)

func PlaylistDeleted

func PlaylistDeleted(playlist_id uint, author_id uint) string

func PlaylistNeedRefresh

func PlaylistNeedRefresh(playlist_id uint, author_id uint) string

Types

type WSPool

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

func GetWSPool

func GetWSPool() *WSPool

func (*WSPool) AddSocket

func (wsPool *WSPool) AddSocket(socket *WebSocket)

func (*WSPool) BroadcastMessage

func (wsPool *WSPool) BroadcastMessage(authorId uint, playlistId uint, message string)

func (*WSPool) CreateWebSocket

func (wsPool *WSPool) CreateWebSocket(w http.ResponseWriter, r *http.Request) *WebSocket

func (*WSPool) GetSocket

func (wsPool *WSPool) GetSocket(client uint) *WebSocket

func (*WSPool) RemoveSocket

func (wsPool *WSPool) RemoveSocket(socket *WebSocket)

type WebSocket

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

Jump to

Keyboard shortcuts

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