handlers

package
v0.0.0-...-257b6ac Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultUpgrader specifies the parameters for upgrading an HTTP
	// connection to a WebSocket connection.
	DefaultUpgrader = &websocket.Upgrader{
		ReadBufferSize:  1024,
		WriteBufferSize: 1024,
	}

	// DefaultDialer is a dialer with all fields set to the default zero values.
	DefaultDialer = websocket.DefaultDialer
)

Functions

func API

func API(w http.ResponseWriter, r *http.Request)

API Information

func Home

func Home(w http.ResponseWriter, r *http.Request)

Home default handle func

func IsWebSocket

func IsWebSocket(headers http.Header) bool

IsWebSocket check connection is or not weboscket

func NotFound

func NotFound(w http.ResponseWriter, r *http.Request)

NotFound handle 404

Types

This section is empty.

Jump to

Keyboard shortcuts

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