connection

package
v0.0.0-...-8904ad9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PacketSecretBlock    = 0x02
	PacketPing           = 0x04
	PacketStreamChunk    = 0x08
	PacketStreamChunkRes = 0x09
	PacketChannelError   = 0x0a
	PacketChannelAbort   = 0x0b
	PacketRequestKey     = 0x0c
	PacketAesKey         = 0x0d
	PacketAesKeyError    = 0x0e

	PacketImage       = 0x19
	PacketCountryCode = 0x1b

	PacketPong    = 0x49
	PacketPongAck = 0x4a
	PacketPause   = 0x4b

	PacketProductInfo   = 0x50
	PacketLegacyWelcome = 0x69

	PacketLicenseVersion = 0x76

	PacketLogin       = 0xab
	PacketAPWelcome   = 0xac
	PacketAuthFailure = 0xad

	PacketMercuryReq   = 0xb2
	PacketMercurySub   = 0xb3
	PacketMercuryUnsub = 0xb4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PacketStream

type PacketStream interface {
	SendPacket(cmd uint8, data []byte) (err error)
	RecvPacket() (cmd uint8, buf []byte, err error)
}

type PlainConnection

type PlainConnection struct {
	Writer io.Writer
	Reader io.Reader
	// contains filtered or unexported fields
}

PlainConnection represents an unencrypted connection to a Spotify AP

func MakePlainConnection

func MakePlainConnection(reader io.Reader, writer io.Writer) PlainConnection

func (*PlainConnection) RecvPacket

func (p *PlainConnection) RecvPacket() (buf []byte, err error)

func (*PlainConnection) SendPrefixPacket

func (p *PlainConnection) SendPrefixPacket(prefix []byte, data []byte) (packet []byte, err error)

Jump to

Keyboard shortcuts

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