C# Class PeerCastStation.Core.OutputStreamBase

Inheritance: System.MarshalByRefObject, IOutputStream
ファイルを表示 Open project: kumaryu/peercaststation Class Usage Examples

Public Methods

Method Description
CreateTrackerUri ( System.Guid channel_id, string tip ) : Uri
GetConnectionInfo ( ) : ConnectionInfo
OutputStreamBase ( PeerCastStation.Core.PeerCast peercast, Stream input_stream, Stream output_stream, EndPoint remote_endpoint, AccessControlInfo access_control, Channel channel, byte header ) : System

元になるストリーム、チャンネル、リクエストからHTTPOutputStreamを初期化します

Post ( Host from, Atom packet ) : void
Start ( ) : Task
Stop ( ) : void
Stop ( StopReason reason ) : void

Protected Methods

Method Description
DoPost ( Host from, Atom packet, CancellationToken cancel_token ) : System.Threading.Task
DoProcess ( CancellationToken cancel_token ) : Task
GetUpstreamRate ( ) : int
OnError ( Exception err ) : System.Threading.Task
OnError ( Exception err, CancellationToken cancel_token ) : System.Threading.Task
OnStarted ( CancellationToken cancel_token ) : System.Threading.Task
OnStopped ( CancellationToken cancel_token ) : System.Threading.Task

Private Methods

Method Description
ParseEndPoint ( string text ) : string

Method Details

CreateTrackerUri() public static method

public static CreateTrackerUri ( System.Guid channel_id, string tip ) : Uri
channel_id System.Guid
tip string
return System.Uri

DoPost() protected method

protected DoPost ( Host from, Atom packet, CancellationToken cancel_token ) : System.Threading.Task
from Host
packet Atom
cancel_token System.Threading.CancellationToken
return System.Threading.Task

DoProcess() protected abstract method

protected abstract DoProcess ( CancellationToken cancel_token ) : Task
cancel_token System.Threading.CancellationToken
return Task

GetConnectionInfo() public abstract method

public abstract GetConnectionInfo ( ) : ConnectionInfo
return ConnectionInfo

GetUpstreamRate() protected method

protected GetUpstreamRate ( ) : int
return int

OnError() protected method

protected OnError ( Exception err ) : System.Threading.Task
err System.Exception
return System.Threading.Task

OnError() protected method

protected OnError ( Exception err, CancellationToken cancel_token ) : System.Threading.Task
err System.Exception
cancel_token System.Threading.CancellationToken
return System.Threading.Task

OnStarted() protected method

protected OnStarted ( CancellationToken cancel_token ) : System.Threading.Task
cancel_token System.Threading.CancellationToken
return System.Threading.Task

OnStopped() protected method

protected OnStopped ( CancellationToken cancel_token ) : System.Threading.Task
cancel_token System.Threading.CancellationToken
return System.Threading.Task

OutputStreamBase() public method

元になるストリーム、チャンネル、リクエストからHTTPOutputStreamを初期化します
public OutputStreamBase ( PeerCastStation.Core.PeerCast peercast, Stream input_stream, Stream output_stream, EndPoint remote_endpoint, AccessControlInfo access_control, Channel channel, byte header ) : System
peercast PeerCastStation.Core.PeerCast 所属するPeerCast
input_stream Stream 元になる受信ストリーム
output_stream Stream 元になる送信ストリーム
remote_endpoint System.Net.EndPoint 接続先のアドレス
access_control AccessControlInfo 接続可否および認証の情報
channel Channel 所属するチャンネル。無い場合はnull
header byte
return System

Post() public method

public Post ( Host from, Atom packet ) : void
from Host
packet Atom
return void

Start() public method

public Start ( ) : Task
return Task

Stop() public method

public Stop ( ) : void
return void

Stop() public method

public Stop ( StopReason reason ) : void
reason StopReason
return void