webrtcutil

package
v0.11.0-alpha6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package webrtcutil provides utilities to complement github.com/pion/webrtc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(dataChannel *webrtc.DataChannel, closureCallback func()) (net.Conn, error)

NewConnection creates a new net.Conn using the specified data channel as its underlying transport. The data channel must support stream detaching (which it will if created from this package's API instance), otherwise a panic will occur. If this function returns an error, then the data channel should be considered errored, and it will be the responsibility of the caller to close the data channel. If this function succeeds, then the data channel should not be closed directly but will instead be closed by closing the returned connection.

func NewLoggerFactory

func NewLoggerFactory(name string) logging.LoggerFactory

NewLoggerFactory creates a LoggerFactory that uses Mutagen's logging infrastructure. The factory contains a sublogger of the root logger with the specified name. Derived LeveledLogger instances are created as subloggers of the factory's logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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