implementation

package
v0.0.0-...-0fca33f Latest Latest
Warning

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

Go to latest
Published: May 12, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Used to prevent import cycle

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebsocketHolder

type WebsocketHolder struct {
	// Websocket
	WS *websocket.Conn
	// Done is used to gracefully exit all WS connections
	Done  chan struct{}
	TRoom string

	Users       map[string]*user.ASUser
	RealUsers   map[string]*user.RealUser
	TwitchUsers map[string]*user.ASUser
	TwitchRooms map[string]string
}

func (*WebsocketHolder) Connect

func (w *WebsocketHolder) Connect(oauthToken, username string) (err error)

Connect opens a Websocket and requests the needed Capabilities and does the Login

func (*WebsocketHolder) GetWS

func (w *WebsocketHolder) GetWS() *websocket.Conn

func (*WebsocketHolder) Join

func (w *WebsocketHolder) Join(channel string) error

func (*WebsocketHolder) Listen

func (w *WebsocketHolder) Listen()

Listen answers to the PING messages by Twitch and relays messages to Matrix

func (*WebsocketHolder) Pong

func (w *WebsocketHolder) Pong(server string) error

func (*WebsocketHolder) Send

func (w *WebsocketHolder) Send(channel, messageRaw string) error

Jump to

Keyboard shortcuts

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