shoutcast

package module
v0.0.0-...-385d5ba Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2014 License: GPL-3.0 Imports: 7 Imported by: 1

README

Go ShoutCast

Connect a ShoutCast server to send stream

Usage

client := shoutcast.Client{
  Host:     "example.com:8000",
  Password: "secret",
  Headers: map[string]string{
	"icy-bt":  "96",
	"icy-pub": "1",
    "content-type": "audio/mpeg",
  },
}

connection, err := client.Connect()
if err != nil {
  // ...
}

// You can send stream data
connection.Write(...)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Host     string
	Password string
	Headers  map[string]string
	Timeout  time.Duration
	// contains filtered or unexported fields
}

func (*Client) Close

func (client *Client) Close()

func (*Client) Connect

func (client *Client) Connect() (connection net.Conn, err error)

func (*Client) Dial

func (client *Client) Dial() error

func (*Client) Flush

func (client *Client) Flush() error

func (*Client) Read

func (client *Client) Read() (response string, err error)

func (*Client) SendHeader

func (client *Client) SendHeader(name, value string) error

func (*Client) SendHeaders

func (client *Client) SendHeaders() error

func (*Client) SendPassword

func (client *Client) SendPassword() error

func (*Client) Write

func (client *Client) Write(message string) error

Jump to

Keyboard shortcuts

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