polling

package
v0.0.0-...-b4c6dbb Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: BSD-3-Clause, BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Creater = transport.Creater{
	Name:      "polling",
	Upgrading: false,
	Server:    NewServer,
	Client:    NewClient,
}

Functions

func MakeSendChan

func MakeSendChan() chan bool

func NewClient

func NewClient(r *http.Request) (transport.Client, error)

func NewServer

func NewServer(w http.ResponseWriter, r *http.Request, callback transport.Callback) (transport.Server, error)

Types

type Locker

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

func NewLocker

func NewLocker() *Locker

func (*Locker) Lock

func (l *Locker) Lock()

func (*Locker) TryLock

func (l *Locker) TryLock() bool

func (*Locker) Unlock

func (l *Locker) Unlock()

type Polling

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

func (*Polling) Close

func (p *Polling) Close() error

func (*Polling) NextWriter

func (p *Polling) NextWriter(msgType message.MessageType, packetType parser.PacketType) (io.WriteCloser, error)

func (*Polling) ServeHTTP

func (p *Polling) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Writer

type Writer struct {
	io.WriteCloser
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.WriteCloser, server *Polling) *Writer

func (*Writer) Close

func (w *Writer) Close() error

Jump to

Keyboard shortcuts

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