send

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

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

To manage the datachannels and PeerConnection.

func NewSession

func NewSession(numberOfFiles int) *Session

Returns new Session object with some default values.

func (*Session) Close

func (s *Session) Close(closehandler bool)

Closes the channels. Ugly.

func (*Session) Connect

func (s *Session) Connect(paths []string) error

Connects clients and creates datachannels.

func (*Session) CreateConnection

func (s *Session) CreateConnection() error

Creates WebRTC PeerConnection.

func (*Session) CreateControlChannel

func (s *Session) CreateControlChannel() error

Creates control datachannel for communicating consent and signaling.

func (*Session) CreateTransferChannel

func (s *Session) CreateTransferChannel(path string, i int) error

Creates Datachannel for file transfer.

func (*Session) Createoffer

func (s *Session) Createoffer() error

Creates offer and encodes it in base64.

func (*Session) HandleState

func (s *Session) HandleState()

Prints the state change.

func (*Session) Handleclose

func (s *Session) Handleclose() func()

Handle the closing of control channel.

func (*Session) Handleopen

func (s *Session) Handleopen() func()

When control datachannel opens.

func (*Session) SendPacket

func (s *Session) SendPacket(proxyReader io.ReadCloser, doc *lib.Document) error

Sends the packet.

Jump to

Keyboard shortcuts

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