public void Start()
{
if (_rtpSocket != null && _controlSocket != null)
{
_startedAt = DateTime.Now;
ThreadPool.QueueUserWorkItem(delegate { RTPReceive(); });
ThreadPool.QueueUserWorkItem(delegate { ProcessRTPPackets(); });
_controlSocketBuffer = new byte[RECEIVE_BUFFER_SIZE];
_controlSocket.BeginReceive(_controlSocketBuffer, 0, _controlSocketBuffer.Length, SocketFlags.None, out _controlSocketError, ControlSocketReceive, null);
}
else
{
logger.Warn("An RTPChannel could not start as either RTP or control sockets were not available.");
}
}