C# Class Rtsp.RtspListener

Rtsp lister
Inheritance: IDisposable
显示文件 Open project: ngraziano/SharpRTSP Class Usage Examples

Public Methods

Method Description
BeginSendData ( Rtsp.Messages.RtspData aRtspData, AsyncCallback asyncCallback, object state ) : IAsyncResult

Begins the send data.

BeginSendData ( int channel, byte frame, AsyncCallback asyncCallback, object state ) : IAsyncResult

Begins the send data.

Dispose ( ) : void
EndSendData ( IAsyncResult result ) : void

Ends the send data.

ReadOneMessage ( Stream commandStream ) : Rtsp.Messages.RtspChunk

Reads one message.

Reconnect ( ) : void

Reconnect this instance of RtspListener.

RtspListener ( IRtspTransport connection ) : System

Initializes a new instance of the RtspListener class from a TCP connection.

SendMessage ( Rtsp.Messages.RtspMessage message ) : bool

Sends the message.

Start ( ) : void

Starts this instance.

Stop ( ) : void

Stops this instance.

Protected Methods

Method Description
Dispose ( bool disposing ) : void
OnDataReceived ( Rtsp.RtspChunkEventArgs rtspChunkEventArgs ) : void

Raises the E:DataReceived event.

OnMessageReceived ( Rtsp.RtspChunkEventArgs e ) : void

Raises the E:MessageReceived event.

Private Methods

Method Description
DoJob ( ) : void

Does the reading job.

This method read one message from TCP connection. If it a response it add the associate question. The sopping is made by the closing of the TCP connection.

Method Details

BeginSendData() public method

Begins the send data.
public BeginSendData ( Rtsp.Messages.RtspData aRtspData, AsyncCallback asyncCallback, object state ) : IAsyncResult
aRtspData Rtsp.Messages.RtspData A Rtsp data.
asyncCallback AsyncCallback The async callback.
state object
return IAsyncResult

BeginSendData() public method

Begins the send data.
public BeginSendData ( int channel, byte frame, AsyncCallback asyncCallback, object state ) : IAsyncResult
channel int The channel.
frame byte The frame.
asyncCallback AsyncCallback The async callback.
state object
return IAsyncResult

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EndSendData() public method

Ends the send data.
public EndSendData ( IAsyncResult result ) : void
result IAsyncResult The result.
return void

OnDataReceived() protected method

Raises the E:DataReceived event.
protected OnDataReceived ( Rtsp.RtspChunkEventArgs rtspChunkEventArgs ) : void
rtspChunkEventArgs Rtsp.RtspChunkEventArgs The instance containing the event data.
return void

OnMessageReceived() protected method

Raises the E:MessageReceived event.
protected OnMessageReceived ( Rtsp.RtspChunkEventArgs e ) : void
e Rtsp.RtspChunkEventArgs The instance containing the event data.
return void

ReadOneMessage() public method

Reads one message.
public ReadOneMessage ( Stream commandStream ) : Rtsp.Messages.RtspChunk
commandStream Stream The Rtsp stream.
return Rtsp.Messages.RtspChunk

Reconnect() public method

Reconnect this instance of RtspListener.
Error during socket
public Reconnect ( ) : void
return void

RtspListener() public method

Initializes a new instance of the RtspListener class from a TCP connection.
public RtspListener ( IRtspTransport connection ) : System
connection IRtspTransport The connection.
return System

SendMessage() public method

Sends the message.
public SendMessage ( Rtsp.Messages.RtspMessage message ) : bool
message Rtsp.Messages.RtspMessage A message.
return bool

Start() public method

Starts this instance.
public Start ( ) : void
return void

Stop() public method

Stops this instance.
public Stop ( ) : void
return void