amp

package
v0.0.0-...-c8b15d8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeStartStream = protocols.Code(15 + iota)
	CodeStopStream
)

Variables

View Source
var (
	Protocol     *ampProtocol
	MiniProtocol = protocols.NewMiniProtocol(Protocol)
)

Functions

func RegisterServer

func RegisterServer(server *protocols.Server, handler Handler) error

Types

type Client

type Client struct {
	protocols.Client
}

func NewClient

func NewClient(client protocols.Client) (*Client, error)

func NewClientFor

func NewClientFor(server_addr string) (*Client, error)

func (*Client) StartStream

func (client *Client) StartStream(clientHost string, port int, mediaFile string) error

func (*Client) StopStream

func (client *Client) StopStream(clientHost string, port int) error

type ClientDescription

type ClientDescription struct {
	ReceiverHost string
	Port         int
}

func (*ClientDescription) Client

func (client *ClientDescription) Client() string

type Handler

type Handler interface {
	StopServer()
	StartStream(val *StartStream) error
	StopStream(val *StopStream) error
}

type StartStream

type StartStream struct {
	ClientDescription
	MediaFile string
}

type StopStream

type StopStream struct {
	ClientDescription
}

Jump to

Keyboard shortcuts

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