WNS推送Windows Phone Silverlight 8.1中Voip应用的有效载荷

Abh*_*hek 5 silverlight voip mpns windows-phone-8.1 wns

在windows phone 8中调用voip代理,服务器需要通过MPNS发送带有后续有效负载的类型4原始通知.

HttpWebRequest sendNotificationRequest = (HttpWebRequest)WebRequest.Create(subscriptionUri);

sendNotificationRequest.Method = "POST";

// We will create a HTTPWebRequest that posts the raw notification to the Microsoft Push Notification Service.
// HTTP POST is the only allowed method to send the notification.

// Create the raw message.

string rawMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<root></root>";
// Sets the notification payload to send.
byte[] notificationMessage = Encoding.Default.GetBytes(rawMessage);

// Sets the web request content length.
sendNotificationRequest.ContentLength = notificationMessage.Length;
sendNotificationRequest.ContentType = "text/xml";
sendNotificationRequest.Headers.Add("X-NotificationClass", "4");


using (Stream requestStream = sendNotificationRequest.GetRequestStream())
{
    requestStream.Write(notificationMessage, 0, notificationMessage.Length);
}
Run Code Online (Sandbox Code Playgroud)

使用WNS作为通知服务启动voip代理的推送有效负载是什么?