rtmpsclient

package
v0.0.0-...-a4ddc4c Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2013 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RIOT_SIG_SIZE          = 1528
	RTMP_SIG_SIZE          = 1536
	RTMP_LARGE_HEADER_SIZE = 12
	SHA256_DIGEST_LENGTH   = 32
	RTMP_DEFAULT_CHUNKSIZE = 128
	MAX_TIMESTAMP          = uint32(2000000000)
)

Variables

View Source
var LeagueServerInfo = map[string]ServerInfo{
	"NA": ServerInfo{
		Region:   "NA",
		Platform: "NA1",
		Name:     "North America",
		Server: url.URL{
			Host: "prod.na1.lol.riotgames.com",
		},
		LoginQueue: url.URL{
			Scheme: "https",
			Host:   "lq.na1.lol.riotgames.com",
		},
	},
	"EUW": ServerInfo{
		Region:   "EUW",
		Platform: "EUW1",
		Name:     "Europe West",
		Server: url.URL{
			Host: "prod.eu.lol.riotgames.com",
		},
		LoginQueue: url.URL{
			Scheme: "https",
			Host:   "lq.eu.lol.riotgames.com",
		},
	},
	"EUNE": ServerInfo{
		Region:   "EUNE",
		Platform: "EUN1",
		Name:     "Europe Nordic & East",
		Server: url.URL{
			Host: "prod.eun1.lol.riotgames.com",
		},
		LoginQueue: url.URL{
			Scheme: "https",
			Host:   "lq.eun1.lol.riotgames.com",
		},
	},
}

Functions

func CheckError

func CheckError(err error, name string)

If error panic

func CreateRandomBlock

func CreateRandomBlock(size uint) []byte

func DecodeConnect

func DecodeConnect(data []byte) connectionResponse

func DecodeMessage

func DecodeMessage(data []byte) amf.Object

func GetTimestamp

func GetTimestamp() uint32

Get timestamp

func Handshake

func Handshake(c net.Conn, br *bufio.Reader, bw *bufio.Writer, timeout time.Duration) (err error)

func InvokeIdGenerator

func InvokeIdGenerator(idChannel chan<- int)

func StartHeartbeat

func StartHeartbeat(accountID int, sessionToken, dsid string, writeChan chan<- []byte, lookupRequestChan chan<- MessageLookup, cancelChan <-chan bool, idGeneratorChannel <-chan int)

Types

type LookupResponse

type LookupResponse struct {
	Err     error
	Message amf.Object
}

type MessageLookup

type MessageLookup struct {
	MessageID  int
	ReturnChan chan LookupResponse
}

func NewMessageLookup

func NewMessageLookup(id int) MessageLookup

type RTMPSClient

type RTMPSClient struct {
	// contains filtered or unexported fields
}

func New

func New(addr string, app string, swfURL string, pageURL string) RTMPSClient

func (RTMPSClient) BlockingRequest

func (client RTMPSClient) BlockingRequest(destination string, operation interface{}, body interface{}, timeout int) (amf.Object, error)

func (*RTMPSClient) Connect

func (client *RTMPSClient) Connect() (err error)

func (*RTMPSClient) Dial

func (client *RTMPSClient) Dial(dialurl string) error

func (RTMPSClient) GetNextID

func (client RTMPSClient) GetNextID() int

func (*RTMPSClient) Login

func (client *RTMPSClient) Login(username, password, clientVersion string) (err error)

func (*RTMPSClient) SafeWrite

func (client *RTMPSClient) SafeWrite(data []byte)

type ServerInfo

type ServerInfo struct {
	Region     string
	Platform   string
	Name       string
	Server     url.URL
	LoginQueue url.URL
	IsGarena   bool
}

Jump to

Keyboard shortcuts

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