예제 #1
0
 private string WaitCommand(ServerManager.ActivityController activityController)
 {
     StreamReader pushStream;
     string str2;
     PushServerProxy proxy;
     lock ((proxy = this))
     {
         this.Check();
         pushStream = this.pushStream;
     }
     try
     {
         string str = this.serverTranslator.WaitCommand(pushStream);
         activityController.OnActivity();
         str2 = str;
     }
     catch (PushLengthException exception)
     {
         lock ((proxy = this))
         {
             this.Check();
             this.streamCompleted = true;
         }
         activityController.StopKeepalives();
         throw exception;
     }
     catch (IOException exception2)
     {
         lock ((proxy = this))
         {
             this.Check();
             this.streamCompleted = true;
         }
         throw new PushConnException(exception2);
     }
     catch (WebException exception3)
     {
         lock ((proxy = this))
         {
             this.Check();
             this.streamCompleted = true;
         }
         throw new PushConnException(exception3);
     }
     return str2;
 }
 private string WaitCommand(ServerManager.ActivityController activityController)
 {
     string str2;
     try
     {
         string str = this.serverTranslator.WaitCommand(this.pushStream);
         activityController.OnActivity();
         str2 = str;
     }
     catch (PushLengthException exception)
     {
         this.Check();
         activityController.StopKeepalives();
         throw exception;
     }
     catch (IOException exception2)
     {
         this.Check();
         throw new PushConnException(exception2);
     }
     return str2;
 }
예제 #3
0
 private InfoString WaitCommand(ServerManager.ActivityController activityController)
 {
     StreamReader currStream;
     InfoString infoString;
     PushServerProxy proxy;
     lock ((proxy = this))
     {
         this.Check();
         currStream = this.pushStream;
     }
     try
     {
         InfoString pushData = this.serverTranslator.WaitCommand(currStream);
         if ((pushData != null) && (pushData.value == null))
         {
             this.Check();
             activityController.StopKeepalives();
         }
         else
         {
             activityController.OnActivity();
         }
         infoString = pushData;
     }
     catch (PushEndException e)
     {
         lock ((proxy = this))
         {
             this.Check();
             this.streamCompleted = true;
         }
         throw e;
     }
     catch (IOException e)
     {
         lock ((proxy = this))
         {
             this.Check();
             this.streamCompleted = true;
         }
         throw new PushConnException(e);
     }
     catch (WebException e)
     {
         lock ((proxy = this))
         {
             this.Check();
             this.streamCompleted = true;
         }
         throw new PushConnException(e);
     }
     return infoString;
 }