ws

package
v0.0.0-...-c5bcced Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

The ws package enables sending and receiving data over a websocket connection.

var ws = require('ws')
ws.upgrade();
ws.recv(function(msg) {
	console.log('Received:', msg);
	ws.send(ws.TEXT, msg);
});

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(orb *orbit.Orbit) interface{}

Types

type Module

type Module struct {
	TEXT   int
	BINARY int
	// contains filtered or unexported fields
}

func (*Module) Exit

func (this *Module) Exit()

func (*Module) Init

func (this *Module) Init()

func (*Module) Recv

func (this *Module) Recv(callback func(string))

func (*Module) Send

func (this *Module) Send(kind int, data string)

func (*Module) Upgrade

func (this *Module) Upgrade()

Jump to

Keyboard shortcuts

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