|
using System;
namespace SocketServerLib.SocketHandler
{
/// <summary>
/// This class represent a socket exception in the libray.
/// </summary>
class TcpSocketException : Exception
{
/// <summary>
/// Flag to decide if a disconnection is required due the exception.
/// </summary>
private bool disconnectionRequired = false;
/// <summary>
/// Constructor.
/// </summary>
/// <param name="message">The exception message</param>
/// <param name="disconnectionRequired">Flag to indicate if a disconnection is required</param>
public TcpSocketException(string message, bool disconnectionRequired)
:base(message)
{
this.disconnectionRequired = disconnectionRequired;
}
/// <summary>
/// Constructor for an exception that not requied a disconnection.
/// </summary>
/// <param name="message">The exception message</param>
public TcpSocketException(string message)
:this(message, false)
{
}
/// <summary>
/// Get if a disconnection is required.
/// </summary>
public bool DisconnectionRequired
{
get
{
return this.disconnectionRequired;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I’m an IT Project Manager for an Italian Betting Company and over the last 2 years I acquired experience in Betting area.
I have developed code in different object oriented languages (C#, C++, Java) for more than 10 years using a set of technology such as .Net, J2EE, multithreading, etc…