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 ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.