示例#1
0
        private void SimpleModule_NotifyEvent(string publisherId, string subscriptionId, int expires, PresenceDocument document)
        {
            var dialog = dialogManager.Get(new ByteArrayPart(subscriptionId));

            if (dialog != null)
            {
                SendNotify(dialog, expires, document);
            }
        }
示例#2
0
        private void ProccessUnsubscribe(AcceptedRequest tu, IncomingMessageEx request)
        {
            var writer = GetWriter();

            var dialog = dialogManager.Get(request.Reader);

            if (dialog != null)
            {
                writer.WriteResponse(request.Reader, StatusCodes.OK, dialog.LocalTag);
                dialogManager.Remove(dialog.Id);
            }
            else
            {
                writer.WriteResponse(request.Reader, StatusCodes.OK);
            }

            tu.SendResponse(request, writer);
        }