diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Example')
3 files changed, 35 insertions, 35 deletions
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs index bbf7168..95a2dd6 100644 --- a/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs +++ b/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs | |||
@@ -46,12 +46,12 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared | |||
46 | /// </summary> | 46 | /// </summary> |
47 | /// <remarks> | 47 | /// <remarks> |
48 | /// This module is the simplest possible example of a non-shared region module (a module where each scene/region | 48 | /// This module is the simplest possible example of a non-shared region module (a module where each scene/region |
49 | /// in the simulator has its own copy). If anybody wants to create a more complex example in the future then | 49 | /// in the simulator has its own copy). If anybody wants to create a more complex example in the future then |
50 | /// please create a separate class. | 50 | /// please create a separate class. |
51 | /// | 51 | /// |
52 | /// This module is not active by default. If you want to see it in action, | 52 | /// This module is not active by default. If you want to see it in action, |
53 | /// then just uncomment the line below starting with [Extension(Path... | 53 | /// then just uncomment the line below starting with [Extension(Path... |
54 | /// | 54 | /// |
55 | /// When the module is enabled it will print messages when it receives certain events to the screen and the log | 55 | /// When the module is enabled it will print messages when it receives certain events to the screen and the log |
56 | /// file. | 56 | /// file. |
57 | /// </remarks> | 57 | /// </remarks> |
@@ -59,34 +59,34 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared | |||
59 | public class BareBonesNonSharedModule : INonSharedRegionModule | 59 | public class BareBonesNonSharedModule : INonSharedRegionModule |
60 | { | 60 | { |
61 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 61 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
62 | 62 | ||
63 | public string Name { get { return "Bare Bones Non Shared Module"; } } | 63 | public string Name { get { return "Bare Bones Non Shared Module"; } } |
64 | 64 | ||
65 | public Type ReplaceableInterface { get { return null; } } | 65 | public Type ReplaceableInterface { get { return null; } } |
66 | 66 | ||
67 | public void Initialise(IConfigSource source) | 67 | public void Initialise(IConfigSource source) |
68 | { | 68 | { |
69 | m_log.DebugFormat("[BARE BONES NON SHARED]: INITIALIZED MODULE"); | 69 | m_log.DebugFormat("[BARE BONES NON SHARED]: INITIALIZED MODULE"); |
70 | } | 70 | } |
71 | 71 | ||
72 | public void Close() | 72 | public void Close() |
73 | { | 73 | { |
74 | m_log.DebugFormat("[BARE BONES NON SHARED]: CLOSED MODULE"); | 74 | m_log.DebugFormat("[BARE BONES NON SHARED]: CLOSED MODULE"); |
75 | } | 75 | } |
76 | 76 | ||
77 | public void AddRegion(Scene scene) | 77 | public void AddRegion(Scene scene) |
78 | { | 78 | { |
79 | m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); | 79 | m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); |
80 | } | 80 | } |
81 | 81 | ||
82 | public void RemoveRegion(Scene scene) | 82 | public void RemoveRegion(Scene scene) |
83 | { | 83 | { |
84 | m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); | 84 | m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); |
85 | } | 85 | } |
86 | 86 | ||
87 | public void RegionLoaded(Scene scene) | 87 | public void RegionLoaded(Scene scene) |
88 | { | 88 | { |
89 | m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); | 89 | m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | } \ No newline at end of file | 92 | } \ No newline at end of file |
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs index 46fea3e..1271e3f 100644 --- a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs +++ b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs | |||
@@ -46,52 +46,52 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesShared | |||
46 | /// </summary> | 46 | /// </summary> |
47 | /// <remarks> | 47 | /// <remarks> |
48 | /// This module is the simplest possible example of a shared region module (a module which is shared by every | 48 | /// This module is the simplest possible example of a shared region module (a module which is shared by every |
49 | /// scene/region running on the simulator). If anybody wants to create a more complex example in the future then | 49 | /// scene/region running on the simulator). If anybody wants to create a more complex example in the future then |
50 | /// please create a separate class. | 50 | /// please create a separate class. |
51 | /// | 51 | /// |
52 | /// This module is not active by default. If you want to see it in action, | 52 | /// This module is not active by default. If you want to see it in action, |
53 | /// then just uncomment the line below starting with [Extension(Path... | 53 | /// then just uncomment the line below starting with [Extension(Path... |
54 | /// | 54 | /// |
55 | /// When the module is enabled it will print messages when it receives certain events to the screen and the log | 55 | /// When the module is enabled it will print messages when it receives certain events to the screen and the log |
56 | /// file. | 56 | /// file. |
57 | /// </remarks> | 57 | /// </remarks> |
58 | //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BareBonesSharedModule")] | 58 | //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BareBonesSharedModule")] |
59 | public class BareBonesSharedModule : ISharedRegionModule | 59 | public class BareBonesSharedModule : ISharedRegionModule |
60 | { | 60 | { |
61 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 61 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
62 | 62 | ||
63 | public string Name { get { return "Bare Bones Shared Module"; } } | 63 | public string Name { get { return "Bare Bones Shared Module"; } } |
64 | 64 | ||
65 | public Type ReplaceableInterface { get { return null; } } | 65 | public Type ReplaceableInterface { get { return null; } } |
66 | 66 | ||
67 | public void Initialise(IConfigSource source) | 67 | public void Initialise(IConfigSource source) |
68 | { | 68 | { |
69 | m_log.DebugFormat("[BARE BONES SHARED]: INITIALIZED MODULE"); | 69 | m_log.DebugFormat("[BARE BONES SHARED]: INITIALIZED MODULE"); |
70 | } | 70 | } |
71 | 71 | ||
72 | public void PostInitialise() | 72 | public void PostInitialise() |
73 | { | 73 | { |
74 | m_log.DebugFormat("[BARE BONES SHARED]: POST INITIALIZED MODULE"); | 74 | m_log.DebugFormat("[BARE BONES SHARED]: POST INITIALIZED MODULE"); |
75 | } | 75 | } |
76 | 76 | ||
77 | public void Close() | 77 | public void Close() |
78 | { | 78 | { |
79 | m_log.DebugFormat("[BARE BONES SHARED]: CLOSED MODULE"); | 79 | m_log.DebugFormat("[BARE BONES SHARED]: CLOSED MODULE"); |
80 | } | 80 | } |
81 | 81 | ||
82 | public void AddRegion(Scene scene) | 82 | public void AddRegion(Scene scene) |
83 | { | 83 | { |
84 | m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); | 84 | m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); |
85 | } | 85 | } |
86 | 86 | ||
87 | public void RemoveRegion(Scene scene) | 87 | public void RemoveRegion(Scene scene) |
88 | { | 88 | { |
89 | m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); | 89 | m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); |
90 | } | 90 | } |
91 | 91 | ||
92 | public void RegionLoaded(Scene scene) | 92 | public void RegionLoaded(Scene scene) |
93 | { | 93 | { |
94 | m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); | 94 | m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | } \ No newline at end of file | 97 | } \ No newline at end of file |
diff --git a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs index 5bf0ed4..0747cc0 100644 --- a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs +++ b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs | |||
@@ -40,7 +40,7 @@ using OpenSim.Framework.Servers.HttpServer; | |||
40 | 40 | ||
41 | namespace OpenSim.Region.OptionalModules.WebSocketEchoModule | 41 | namespace OpenSim.Region.OptionalModules.WebSocketEchoModule |
42 | { | 42 | { |
43 | 43 | ||
44 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebSocketEchoModule")] | 44 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebSocketEchoModule")] |
45 | public class WebSocketEchoModule : ISharedRegionModule | 45 | public class WebSocketEchoModule : ISharedRegionModule |
46 | { | 46 | { |
@@ -111,7 +111,7 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule | |||
111 | obj.SendPingCheck(); | 111 | obj.SendPingCheck(); |
112 | } | 112 | } |
113 | 113 | ||
114 | 114 | ||
115 | private void HandlerOnOnUpgradeCompleted(object sender, UpgradeCompletedEventArgs completeddata) | 115 | private void HandlerOnOnUpgradeCompleted(object sender, UpgradeCompletedEventArgs completeddata) |
116 | { | 116 | { |
117 | WebSocketHttpServerHandler obj = sender as WebSocketHttpServerHandler; | 117 | WebSocketHttpServerHandler obj = sender as WebSocketHttpServerHandler; |
@@ -136,14 +136,14 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule | |||
136 | obj.Dispose(); | 136 | obj.Dispose(); |
137 | } | 137 | } |
138 | 138 | ||
139 | // Shutting down.. so shut down all sockets. | 139 | // Shutting down.. so shut down all sockets. |
140 | // Note.. this should be done outside of an ienumerable if you're also hook to the close event. | 140 | // Note.. this should be done outside of an ienumerable if you're also hook to the close event. |
141 | public void Close() | 141 | public void Close() |
142 | { | 142 | { |
143 | if (!enabled) | 143 | if (!enabled) |
144 | return; | 144 | return; |
145 | 145 | ||
146 | // We convert this to a for loop so we're not in in an IEnumerable when the close | 146 | // We convert this to a for loop so we're not in in an IEnumerable when the close |
147 | //call triggers an event which then removes item from _activeHandlers that we're enumerating | 147 | //call triggers an event which then removes item from _activeHandlers that we're enumerating |
148 | WebSocketHttpServerHandler[] items = new WebSocketHttpServerHandler[_activeHandlers.Count]; | 148 | WebSocketHttpServerHandler[] items = new WebSocketHttpServerHandler[_activeHandlers.Count]; |
149 | _activeHandlers.CopyTo(items); | 149 | _activeHandlers.CopyTo(items); |