castv2

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

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

Go to latest
Published: Sep 27, 2016 License: MIT Imports: 10 Imported by: 7 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-castv2

An implementation of the Chromecast CASTV2 protocol in Golang.

Ported from node-castv2 and node-castv2-client

Examples

For examples of how to use it, see https://github.com/ninjasphere/driver-go-chromecast/blob/master/device.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPacketStream

func NewPacketStream(stream io.ReadWriteCloser) *packetStream

Types

type Channel

type Channel struct {
	DestinationId string
	// contains filtered or unexported fields
}

func (*Channel) OnMessage

func (c *Channel) OnMessage(responseType string, cb func(*api.CastMessage))

func (*Channel) Request

func (c *Channel) Request(payload hasRequestId, timeout time.Duration) (*api.CastMessage, error)

func (*Channel) Send

func (c *Channel) Send(payload interface{}) error

type Client

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

func NewClient

func NewClient(host net.IP, port int) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) NewChannel

func (c *Client) NewChannel(sourceId, destinationId, namespace string) *Channel

func (*Client) Send

func (c *Client) Send(message *api.CastMessage) error

type PayloadHeaders

type PayloadHeaders struct {
	Type      string `json:"type"`
	RequestId *int   `json:"requestId,omitempty"`
}

Directories

Path Synopsis
Package api is a generated protocol buffer package.
Package api is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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