aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs30
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs21
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs4
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs4
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs4
6 files changed, 46 insertions, 19 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index cb60028..0d44abd 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -527,6 +527,9 @@ namespace OpenSim.Framework
527 /// </summary> 527 /// </summary>
528 string Name { get; } 528 string Name { get; }
529 529
530 /// <value>
531 /// Determines whether the client thread is doing anything or not.
532 /// </value>
530 bool IsActive { get; set; } 533 bool IsActive { get; set; }
531 534
532 bool SendLogoutPacketWhenClosing { set; } 535 bool SendLogoutPacketWhenClosing { set; }
@@ -749,6 +752,23 @@ namespace OpenSim.Framework
749 752
750 event UserInfoRequest OnUserInfoRequest; 753 event UserInfoRequest OnUserInfoRequest;
751 event UpdateUserInfo OnUpdateUserInfo; 754 event UpdateUserInfo OnUpdateUserInfo;
755
756 /// <summary>
757 /// Set the debug level at which packet output should be printed to console.
758 /// </summary>
759 void SetDebugPacketLevel(int newDebug);
760
761 void InPacket(object NewPack);
762 void ProcessInPacket(Packet NewPack);
763 void Close(bool ShutdownCircuit);
764 void Kick(string message);
765
766 /// <summary>
767 /// Start processing for this client.
768 /// </summary>
769 void Start();
770
771 void Stop();
752 772
753 // void ActivateGesture(UUID assetId, UUID gestureId); 773 // void ActivateGesture(UUID assetId, UUID gestureId);
754 774
@@ -1034,16 +1054,6 @@ namespace OpenSim.Framework
1034 1054
1035 byte[] GetThrottlesPacked(float multiplier); 1055 byte[] GetThrottlesPacked(float multiplier);
1036 1056
1037 /// <summary>
1038 /// Set the debug level at which packet output should be printed to console.
1039 /// </summary>
1040 void SetDebugPacketLevel(int newDebug);
1041
1042 void InPacket(object NewPack);
1043 void ProcessInPacket(Packet NewPack);
1044 void Close(bool ShutdownCircuit);
1045 void Kick(string message);
1046 void Stop();
1047 event ViewerEffectEventHandler OnViewerEffect; 1057 event ViewerEffectEventHandler OnViewerEffect;
1048 event Action<IClientAPI> OnLogout; 1058 event Action<IClientAPI> OnLogout;
1049 event Action<IClientAPI> OnConnectionClosed; 1059 event Action<IClientAPI> OnConnectionClosed;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 3243c2f..ebbecb7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -471,12 +471,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
471 m_PacketHandler.OnPacketStats += PopulateStats; 471 m_PacketHandler.OnPacketStats += PopulateStats;
472 472
473 RegisterLocalPacketHandlers(); 473 RegisterLocalPacketHandlers();
474
475 m_clientThread = new Thread(Start);
476 m_clientThread.Name = "ClientThread";
477 m_clientThread.IsBackground = true;
478 m_clientThread.Start();
479 ThreadTracker.Add(m_clientThread);
480 } 474 }
481 475
482 public void SetDebugPacketLevel(int newDebugPacketLevel) 476 public void SetDebugPacketLevel(int newDebugPacketLevel)
@@ -813,11 +807,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
813 RefreshGroupMembership(); 807 RefreshGroupMembership();
814 } 808 }
815 809
810 public virtual void Start()
811 {
812 m_clientThread = new Thread(RunUserSession);
813 m_clientThread.Name = "ClientThread";
814 m_clientThread.IsBackground = true;
815 m_clientThread.Start();
816 ThreadTracker.Add(m_clientThread);
817 }
818
816 /// <summary> 819 /// <summary>
817 /// Start a user session. This method lies at the base of the entire client thread. 820 /// Run a user session. This method lies at the base of the entire client thread.
818 /// </summary> 821 /// </summary>
819 protected virtual void Start() 822 protected virtual void RunUserSession()
820 { 823 {
821 //tell this thread we are using the culture set up for the sim (currently hardcoded to en_US) 824 //tell this thread we are using the culture set up for the sim (currently hardcoded to en_US)
822 //otherwise it will override this and use the system default 825 //otherwise it will override this and use the system default
823 Culture.SetCurrentCulture(); 826 Culture.SetCurrentCulture();
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
index 9f8383c..2b52220 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
@@ -160,6 +160,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
160 newuser.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler; 160 newuser.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler;
161 newuser.OnLogout += LogoutHandler; 161 newuser.OnLogout += LogoutHandler;
162 newuser.OnConnectionClosed += CloseClient; 162 newuser.OnConnectionClosed += CloseClient;
163
164 newuser.Start();
163 165
164 return true; 166 return true;
165 } 167 }
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index d06f35a..f0d5de2 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -812,6 +812,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
812 { 812 {
813 } 813 }
814 814
815 public void Start()
816 {
817 }
818
815 public void Stop() 819 public void Stop()
816 { 820 {
817 } 821 }
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 5a7d42c..3710f2c 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -800,6 +800,10 @@ namespace OpenSim.Region.Examples.SimpleModule
800 { 800 {
801 } 801 }
802 802
803 public void Start()
804 {
805 }
806
803 public void Stop() 807 public void Stop()
804 { 808 {
805 } 809 }
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 41c2eb6..a9ee837 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -757,6 +757,10 @@ namespace OpenSim.Tests.Common.Mock
757 { 757 {
758 } 758 }
759 759
760 public void Start()
761 {
762 }
763
760 public void Stop() 764 public void Stop()
761 { 765 {
762 } 766 }