C# Class NewTOAPIA.Net.Rtp.RtpListener

Listens for packets from the network and distributes them to the appropriate RtpStream
Inheritance: IDisposable
ファイルを表示 Open project: Wiladams/NewTOAPIA Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
RtpListener ( RtpSession rtpSession ) : System

Private Methods

Method Description
DisposeBufferPool ( ) : void
DisposeNetwork ( ) : void
DisposeThreads ( ) : void
DistributePackets ( ) : void

DistributePackets turns packets that came from the listener thread into RtpPackets, creating new RtpStreams if one doesn't exist for the RtpPacket's SSRC, then calling RtpStream.newPacket(rtpPacket) to place the RtpPacket into the RtpStream's Queue for processing.

GetBuffer ( ) : BufferChunk

Returns a BufferChunk from the pool, or grows the pool if need be

GrowBufferPool ( ) : void

Grow the buffer pool Called when all the previously allocated packets are in use. Unless we are handling a huge chunk (~= 95MB), it indicates a problem - like packets that aren't being returned to the pool and so we put a limit on the growth.

HandleInvalidPacket ( BufferChunk packet, IPEndPoint src, string exception ) : void
InitializeBufferPool ( ) : void
InitializeNetwork ( ) : void
InitializeThreads ( ) : void
LogEvent ( string msg, EventLogEntryType et, int id ) : void
ReceivePackets ( ) : void
ReturnBuffer ( BufferChunk buffer ) : void

This method is called to return buffers to the bufferPool

Method Details

Dispose() public method

public Dispose ( ) : void
return void

RtpListener() public method

public RtpListener ( RtpSession rtpSession ) : System
rtpSession RtpSession
return System