server

package
v0.0.2-0...-73e7cc5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_CONTROL_RTMP_CLOSE = 100

system control message, not an error, but special control logic. sys ctl: rtmp close stream, support replay.

View Source
const RTMP_SIG_SRS_COPYRIGHT = "Copyright (c) 2015 Yim"
View Source
const RTMP_SIG_SRS_EMAIL = "yiyan.lu@me.com"
View Source
const RTMP_SIG_SRS_KEY = "go.srs"

= server = info.

View Source
const RTMP_SIG_SRS_LICENSE = "The BSD License"
View Source
const RTMP_SIG_SRS_NAME = RTMP_SIG_SRS_KEY + "(simple = rtmp = server)"
View Source
const RTMP_SIG_SRS_PRIMARY_AUTHROS = "Yim"
View Source
const RTMP_SIG_SRS_ROLE = "stream server"
View Source
const RTMP_SIG_SRS_URL = "https://" + RTMP_SIG_SRS_URL_SHORT
View Source
const RTMP_SIG_SRS_URL_SHORT = "http://ilulu.xyz"
View Source
const RTMP_SIG_SRS_VERSION = "0.1.1"

current release version

View Source
const RTMP_SIG_SRS_WEB = "http://ilulu.xyz"
View Source
const SRS_DEFAULT_SID = 1

default stream id for response the createStream request.

View Source
const SRS_ENCODER_SLEEP_MS = 3 * 1000

when error, encoder sleep for a while and retry.

View Source
const SRS_FORWARDER_SLEEP_MS = 3 * 1000

when error, forwarder sleep for a while and retry.

View Source
const SRS_MIN_RECV_TIMEOUT_MS = 60 * 1000

when got a messae header, there must be some data, increase recv timeout to got an entire message.

View Source
const SRS_PAUSED_RECV_TIMEOUT_MS = 30 * 60 * 1000

the timeout to send data to client, when client paused if timeout, close the connection.

View Source
const SRS_PAUSED_SEND_TIMEOUT_MS = 30 * 60 * 1000

the timeout to wait client data, when client paused if timeout, close the connection.

View Source
const SRS_PPROF_PULSE_MS = 800
View Source
const SRS_PPROF_TIMEOUT_MS = 10 * 60 * 1000

the pprof timeout, the ping message recv/send timeout

View Source
const SRS_PPROF_VHOST = "pprof"
View Source
const SRS_PULSE_TIMEOUT_MS = 200

the timeout to wait for client control message, if timeout, we generally ignore and send the data to client, generally, it's the pulse time for data seding.

View Source
const SRS_RECV_TIMEOUT_MS = 30 * 1000

the timeout to send data to client, if timeout, close the connection.

View Source
const SRS_SEND_TIMEOUT_MS = 30 * 1000

the timeout to wait client data, if timeout, close the connection.

View Source
const SRS_STREAM_BUSY_SLEEP_MS = 3 * 1000

when stream is busy, for example, streaming is already publishing, when a new client to request to publish, sleep a while and close the connection.

Variables

This section is empty.

Functions

func IsSystemControlError

func IsSystemControlError(err error) bool

* * whether the error code is an system control error.

@see: srs_is_system_control_error

func IsSystemControlRtmpClose

func IsSystemControlRtmpClose(err error) bool

func SrsGenerateId

func SrsGenerateId() uint64

Types

type SrsClient

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

the client provides the main logic control for RTMP clients.

func NewSrsClient

func NewSrsClient(conn *net.TCPConn, server *SrsServer) (r *SrsClient, err error)

type SrsError

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

func (SrsError) Error

func (err SrsError) Error() string

type SrsResponse

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

the response info for srs.

func NewSrsResponse

func NewSrsResponse() *SrsResponse

type SrsServer

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

func NewSrsServer

func NewSrsServer(addr string, cb callback.RTMPCallback, sources *source.SourceManage,
	enbleIM bool, imServer *im.IMServer) *SrsServer

func (*SrsServer) Serve

func (r *SrsServer) Serve() error

Jump to

Keyboard shortcuts

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