Documentation ¶
Index ¶
- Constants
- func NewPacketStream(stream io.ReadWriteCloser, logger logrus.FieldLogger) *packetStream
- type Device
- func (d *Device) Connect(ctx context.Context) error
- func (d *Device) Disconnect()
- func (d *Device) Dispatch(event events.Event)
- func (d *Device) Ip() net.IP
- func (d *Device) Name() string
- func (d *Device) OnEvent(callback func(event events.Event))
- func (d *Device) Port() int
- func (d *Device) Send(urn, sourceId, destinationId string, payload responses.Payload) error
- func (d *Device) SetIp(ip net.IP)
- func (d *Device) SetLogger(logger logrus.FieldLogger)
- func (d *Device) SetName(name string)
- func (d *Device) SetPort(port int)
- func (d *Device) SetUuid(uuid string)
- func (d *Device) String() string
- func (d *Device) Subscribe(urn, destinationId string, handler Handler)
- func (d *Device) UnsubscribeByUrn(urn string)
- func (d *Device) UnsubscribeByUrnAndDestinationId(urn, destinationId string)
- func (d *Device) Uuid() string
- type Handler
- type Subscription
Constants ¶
View Source
const AppMedia = "CC1AD845"
Variables ¶
This section is empty.
Functions ¶
func NewPacketStream ¶
func NewPacketStream(stream io.ReadWriteCloser, logger logrus.FieldLogger) *packetStream
Types ¶
type Device ¶
type Device struct { sync.RWMutex ReceiverHandler *handlers.Receiver // contains filtered or unexported fields }
func NewDevice ¶
func NewDevice(logger logrus.FieldLogger) *Device
func (*Device) Disconnect ¶
func (d *Device) Disconnect()
func (*Device) SetLogger ¶ added in v0.5.1
func (d *Device) SetLogger(logger logrus.FieldLogger)
func (*Device) UnsubscribeByUrn ¶
func (*Device) UnsubscribeByUrnAndDestinationId ¶
type Subscription ¶
type Subscription struct { Urn string SourceId string DestinationId string Handler Handler Device *Device // contains filtered or unexported fields }
func (*Subscription) Receive ¶
func (s *Subscription) Receive(message *api.CastMessage, headers *responses.Headers) bool
func (*Subscription) Request ¶
func (s *Subscription) Request(payload responses.Payload) (*api.CastMessage, error)
Request works like send, but waits for resposne to requestId before returning.
func (*Subscription) Sha256 ¶
func (s *Subscription) Sha256() string
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package api is a generated protocol buffer package.
|
Package api is a generated protocol buffer package. |
Package discovery provides a discovery service for chromecast devices
|
Package discovery provides a discovery service for chromecast devices |
Package main provides an example of the stampzilla/gocast library
|
Package main provides an example of the stampzilla/gocast library |
Click to show internal directories.
Click to hide internal directories.