NpRTC

package module
v0.0.0-...-d0530db Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: MIT Imports: 4 Imported by: 0

README

NpRTC

No pain WebRTC using data-channels

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetOnConnectionState

func SetOnConnectionState(f OnConnectionState)

func SetOnCreateDataChannel

func SetOnCreateDataChannel(f OnCreateDataChannel)

Types

type Connection

type Connection struct {
	IsServer         interface{}
	WebRTCConfig     webrtc.Configuration
	DataChanelConfig webrtc.DataChannelInit
	PeerConnection   *webrtc.PeerConnection
	DataChanel       *webrtc.DataChannel
	ID               *uint16
	ApplyString      string
	ApproveString    string

	OnCreateDataChannel
	OnConnectionState
	OnMessage
	OnOpen
	OnClose
	OnError
}

type OnBufferedAmountLow

type OnBufferedAmountLow func(uint16)

type OnClose

type OnClose func(uint16)

type OnConnectionState

type OnConnectionState func(uint16)

type OnCreateDataChannel

type OnCreateDataChannel func(uint16)

type OnError

type OnError func(uint16, error)

type OnMessage

type OnMessage func(uint16, webrtc.DataChannelMessage)

type OnOpen

type OnOpen func(uint16)

type Result

type Result struct {
	Err     bool
	Content string
}

func Apply

func Apply(webrtcConfiguration string, dataChannel string) Result

func Approve

func Approve(applyString string, webrtcConfiguration string, dataChannel string) Result

func Close

func Close(applyString string) Result

func Connect

func Connect(applyString string, approveString string) Result

Directories

Path Synopsis
examples
cgo

Jump to

Keyboard shortcuts

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