tethering

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tethering implements the Tethering domain. The Tethering domain defines methods and events for browser port binding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the Tethering domain with the connection set to conn.

Types

type AcceptedClient

type AcceptedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*AcceptedReply, error)
	rpcc.Stream
}

AcceptedClient is a client for Accepted events. Informs that port was successfully bound and got a specified connection id.

type AcceptedReply

type AcceptedReply struct {
	Port         int    `json:"port"`         // Port number that was successfully bound.
	ConnectionID string `json:"connectionId"` // Connection id to be used.
}

AcceptedReply is the reply for Accepted events.

type BindArgs

type BindArgs struct {
	Port int `json:"port"` // Port number to bind.
}

BindArgs represents the arguments for Bind in the Tethering domain.

func NewBindArgs

func NewBindArgs(port int) *BindArgs

NewBindArgs initializes BindArgs with the required arguments.

type UnbindArgs

type UnbindArgs struct {
	Port int `json:"port"` // Port number to unbind.
}

UnbindArgs represents the arguments for Unbind in the Tethering domain.

func NewUnbindArgs

func NewUnbindArgs(port int) *UnbindArgs

NewUnbindArgs initializes UnbindArgs with the required arguments.

Jump to

Keyboard shortcuts

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