Documentation ¶
Index ¶
Constants ¶
const ERROR_CONTROL_RTMP_CLOSE = 100
system control message, not an error, but special control logic. sys ctl: rtmp close stream, support replay.
const RTMP_SIG_SRS_COPYRIGHT = "Copyright (c) 2015 Yim"
const RTMP_SIG_SRS_EMAIL = "yiyan.lu@me.com"
const RTMP_SIG_SRS_KEY = "go.srs"
= server = info.
const RTMP_SIG_SRS_LICENSE = "The BSD License"
const RTMP_SIG_SRS_NAME = RTMP_SIG_SRS_KEY + "(simple = rtmp = server)"
const RTMP_SIG_SRS_PRIMARY_AUTHROS = "Yim"
const RTMP_SIG_SRS_ROLE = "stream server"
const RTMP_SIG_SRS_URL = "https://" + RTMP_SIG_SRS_URL_SHORT
const RTMP_SIG_SRS_URL_SHORT = "http://ilulu.xyz"
const RTMP_SIG_SRS_VERSION = "0.1.1"
current release version
const RTMP_SIG_SRS_WEB = "http://ilulu.xyz"
const SRS_DEFAULT_SID = 1
default stream id for response the createStream request.
const SRS_ENCODER_SLEEP_MS = 3 * 1000
when error, encoder sleep for a while and retry.
const SRS_FORWARDER_SLEEP_MS = 3 * 1000
when error, forwarder sleep for a while and retry.
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.
const SRS_PAUSED_RECV_TIMEOUT_MS = 30 * 60 * 1000
the timeout to send data to client, when client paused if timeout, close the connection.
const SRS_PAUSED_SEND_TIMEOUT_MS = 30 * 60 * 1000
the timeout to wait client data, when client paused if timeout, close the connection.
const SRS_PPROF_PULSE_MS = 800
const SRS_PPROF_TIMEOUT_MS = 10 * 60 * 1000
the pprof timeout, the ping message recv/send timeout
const SRS_PPROF_VHOST = "pprof"
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.
const SRS_RECV_TIMEOUT_MS = 30 * 1000
the timeout to send data to client, if timeout, close the connection.
const SRS_SEND_TIMEOUT_MS = 30 * 1000
the timeout to wait client data, if timeout, close the connection.
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 ¶
* * whether the error code is an system control error.
@see: srs_is_system_control_error
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.
type SrsResponse ¶
type SrsResponse struct {
// contains filtered or unexported fields
}
the response info for srs.
func NewSrsResponse ¶
func NewSrsResponse() *SrsResponse