/ src / modules / MouseWithoutBorders / App / Exceptions / ExpectedSocketException.cs
ExpectedSocketException.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System.Net.Sockets;
 6  
 7  namespace MouseWithoutBorders.Exceptions
 8  {
 9      internal class ExpectedSocketException : KnownException
10      {
11          internal bool ShouldReconnect { get; set; }
12  
13          internal ExpectedSocketException(string message)
14              : base(message)
15          {
16          }
17  
18          internal ExpectedSocketException(SocketException se)
19              : base(se.Message)
20          {
21              ShouldReconnect = se.ErrorCode == 10054;
22          }
23      }
24  }