예제 #1
0
        public static void SendMessage(ClientInfo clientInfo, string message)
        {
            PushClient client = new PushClient();

            try
            {
                client.SendMessageCompleted += new EventHandler <SendMessageCompletedEventArgs>(client_SendMessageCompleted);
                client.SendMessageAsync(clientInfo, message);
                client.CloseAsync();
            }
            catch (Exception e)
            {
                client.Abort();
            }
            finally
            {
                client.CloseAsync();
            }
        }