polling

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = &Transport{
	Client: &http.Client{
		Timeout: time.Minute,
	},
	CheckOrigin: nil,
}

Default is the default transport.

Functions

This section is empty.

Types

type Addr

type Addr struct {
	Host string
}

func (Addr) Network

func (a Addr) Network() string

func (Addr) String

func (a Addr) String() string

type Transport

type Transport struct {
	Client      *http.Client
	CheckOrigin func(r *http.Request) bool
}

Transport is the transport of polling.

func (*Transport) Accept

Accept accepts a http request and create Conn.

func (*Transport) Dial

func (t *Transport) Dial(u *url.URL, requestHeader http.Header) (transport.Conn, error)

Dial dials connection to url.

func (*Transport) Name

func (t *Transport) Name() string

Name is the name of transport.

Jump to

Keyboard shortcuts

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