websockets

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package websockets implements to some extend WebSockets API https://websockets.spec.whatwg.org

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadyState

type ReadyState uint8

ReadyState is websocket specification's readystate

const (
	// CONNECTING is the state while the web socket is connecting
	CONNECTING ReadyState = iota
	// OPEN is the state after the websocket is established and before it starts closing
	OPEN
	// CLOSING is while the websocket is closing but is *not* closed yet
	CLOSING
	// CLOSED is when the websocket is finally closed
	CLOSED
)

type RootModule

type RootModule struct{}

RootModule is the root module for the websockets API

func (*RootModule) NewModuleInstance

func (r *RootModule) NewModuleInstance(vu modules.VU) modules.Instance

NewModuleInstance returns a new instance of the module

type WebSocketsAPI

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

WebSocketsAPI is the k6 extension implementing the websocket API as defined in https://websockets.spec.whatwg.org

func (*WebSocketsAPI) Exports

func (r *WebSocketsAPI) Exports() modules.Exports

Exports implements the modules.Instance interface's Exports

Directories

Path Synopsis
Package events represent the events that can be sent to the client https://dom.spec.whatwg.org/#event
Package events represent the events that can be sent to the client https://dom.spec.whatwg.org/#event

Jump to

Keyboard shortcuts

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