You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lal/pkg/base/session.go

38 lines
2.8 KiB
Go

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// Copyright 2020, Chef. All rights reserved.
// https://github.com/q191201771/lal
//
// Use of this source code is governed by a MIT-style license
// that can be found in the License file.
//
// Author: Chef (191201771@qq.com)
package base
//
// | . | rtmp pub | rtsp pub | rtmp sub | flv sub | ts sub | rtsp sub | rtmp push | rtmp pull | flv pull |
// | - | - | - | - | - | - | - | - | - | - |
// | file | server_session.go | server_pub_session.go | server_session.go | server_sub_session.go | server_sub_session.go | server_sub_session.go | client_push_session.go | client_pull_session.go | client_pull_session.go |
// | struct | ServerSession | PubSession | ServerSession | SubSession | SubSession | SubSession | PushSession | PullSession | PullSession |
//
//
//
// | . | all | rtmppub | rtsppub | rtmpsub | flvsub | tssub | rtspsub | rtmppush | rtmppull | flvpull |
// | - | - | - | - | - | - | - | - | - | - | - |
// | UniqueKey | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ |
// | StreamName | x | √ | √ | √ | √ | √ | √ | √ | √ | x |
// | RunLoop() | x | √ | x | √ | √ | √ | x | x | x | x |
// | Dispose() | x | √ | √ | √ | √ | √ | x | √ | √ | √ |
// | GetStat() | x | √ | √ | √ | √ | √ | x | x | √ | x |
// | UpdateStat() | x | √ | √ | √ | √ | √ | x | x | √ | x |
// | IsAlive() | x | √ | √ | √ | √ | √ | x | x | √ | x |
// | SingleConn | x | √ | x | √ | √ | √ | √ | √ | √ | √ |
// | RemoteAddr() | x | √ | x | √ | √ | x | x | x | x | x |
//
// Dispose由外部调用表示主动关闭正常的session
// 外部调用Dispose后不应继续使用该session
// Dispose后RunLoop结束阻塞
//
// 对端关闭或session内部关闭也会导致RunLoop结束阻塞
//
// RunLoop结束阻塞后可通知上层告知session生命周期结束