castv2

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

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

Go to latest
Published: Apr 6, 2015 License: MIT Imports: 10 Imported by: 0

README

go-castv2

An implementation of the Chromecast CASTV2 protocol in Golang.

Ported from node-castv2 and node-castv2-client

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