using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; namespace Tor { /// /// An enumerator containing the reasons for a stream's failed, closed or detached events. /// public enum StreamReason : int { /// /// No reason was provided. /// [Description(null)] None = 0, /// /// A miscellaneous error occurred. /// [Description("MISC")] Misc = 1, /// /// The stream failed to resolve an address. /// [Description("RESOLVEFAILED")] ResolveFailed = 2, /// /// The stream connect attempt was refused. /// [Description("CONNECTREFUSED")] ConnectRefused = 3, /// /// The exit policy failed. /// [Description("EXITPOLICY")] ExitPolicy = 4, /// /// The stream was destroyed. /// [Description("DESTROY")] Destroy = 5, /// /// The stream closed normally. /// [Description("DONE")] Done = 6, /// /// The stream timed out. /// [Description("TIMEOUT")] Timeout = 7, /// /// There is no route to the host. /// [Description("NOROUTE")] NoRoute = 8, /// /// The server is hibernating. /// [Description("HIBERNATING")] Hibernating = 9, /// /// An internal error occurred. /// [Description("INTERNAL")] Internal = 10, /// /// The server ran out of resources. /// [Description("RESOURCELIMIT")] ResourceLimit = 11, /// /// The connection was reset. /// [Description("CONNRESET")] ConnReset = 12, /// /// There was a tor protocol error. /// [Description("TORPROTOCOL")] TorProtocol = 13, /// /// The stream was not accessing a directory. /// [Description("NOTDIRECTORY")] NotDirectory = 14, /// /// A relay-end cell was received. /// [Description("END")] End = -1, /// /// The client tried to connect to a private address. /// [Description("PRIVATE_ADDR")] PrivateAddr = -1, } }