codecs

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Unlicense Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HttpHandler = http.HttpHandler
View Source
var HttpWebsocketHandler = func(srv *server.Server, origins []string) gohttp.Handler {
	cwss := WebsocketHandler(srv, origins)
	chttp := HttpHandler(srv)
	return gohttp.HandlerFunc(func(w gohttp.ResponseWriter, r *gohttp.Request) {
		if r.Header.Get("upgrade") != "" {
			cwss.ServeHTTP(w, r)
			return
		}
		chttp.ServeHTTP(w, r)
	})
}
View Source
var NewInProc = inproc.NewCodec
View Source
var WebsocketHandler = websocket.WebsocketHandler

Functions

func Dial

func Dial(u string) (codec.Conn, error)

func DialContext

func DialContext(ctx context.Context, u string) (codec.Conn, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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