private void ReceiveHttpRequest(object sender, HttpRequestEventArg e)
{
lock (this.locker)
{
HttpListenerRequest request = e.ListenerContext.Request;
this.DecomposeHttpRequest(request);
PCHC_MESSAGE_TYPE msgType = DecodeMessage.GetMessageType(this.httpRequestPayload);
if (msgType == PCHC_MESSAGE_TYPE.INITIAL_OFFER_MESSAGE)
{
lock (this.initialQueue)
{
this.initialQueue.Enqueue(e.ListenerContext);
}
}
else if (msgType == PCHC_MESSAGE_TYPE.SEGMENT_INFO_MESSAGE)
{
lock (this.segmentQueue)
{
this.segmentQueue.Enqueue(e.ListenerContext);
}
}
}
}