polling

package
Version: v1.7.1-0...-29a0ac7 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2016 License: BSD-3-Clause, Apache-2.0 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL