2 // This file is part of the LWES .NET Binding (LWES.net)
4 // COPYRIGHT (C) 2009, Phillip Clark (cerebralkungfu[at*g mail[dot*com)
5 // original .NET implementation
7 // LWES.net is free software: you can redistribute it and/or modify
8 // it under the terms of the Lesser GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // LWES.net is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the Lesser GNU General Public License
18 // along with LWES.net. If not, see <http://www.gnu.org/licenses/>.
20 namespace Org
.Lwes
.Listener
23 using System
.Collections
.Generic
;
30 /// Represents the state of an event sink.
32 public enum EventSinkStatus
35 /// Indicates the event sink has been suspended and should not receive
36 /// events until activated. This is the initial state for new IEventSinkRegistrationKeys.
40 /// Indicates the event sink is active and may be notified of events
45 /// For event sinks that are not thread-safe, indicates that the sink
46 /// is currently being invoked.
50 /// Indicates the event sink has been canceled.
56 /// Strategies to be taken when garbage data arrives from an endpoint.
58 public enum GarbageHandlingVote
61 /// No opinion on garbage handling. Continue as normal.
65 /// Causes all traffic from an endpoint to be handled by the event
66 /// sink's HandleGarbageData.
68 TreatTrafficFromEndpointAsGarbage
,
70 /// Causes any data received from the endpoint to be discarded as soon
73 IgnoreAllTrafficFromEndpoint
,
75 /// The default strategy. Same as None
81 /// Enumeration for garbage handling strategy employed by Listeners.
83 public enum ListenerGarbageHandling
86 /// Indicates the listener should silently handle garbage data
87 /// but continue to accept data from all endpoints.
91 /// Indicates the listener should ignore data from endpoints
92 /// from which garbage has been received.
94 IgnoreEndpointsThatSendGarbage
= 1,
96 /// Indicates the listener should ask the event sinks to vote
97 /// on the strategy on a per-endpoint basis.
99 /// <see cref="Org.Lwes.Listener.IEventSink"/>
100 AskEventSinksToVoteOnStrategy
= 2,
102 /// The default value: FailSilently
104 Default
= FailSilently
107 #endregion Enumerations