aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/PacketServer.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Region/ClientStack/PacketServer.cs
parent* Deleted .user file (diff)
downloadopensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Region/ClientStack/PacketServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs33
1 files changed, 15 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index 1b64602..f75536a 100644
--- a/OpenSim/Region/ClientStack/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -25,15 +25,11 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic;
29using System.Net; 28using System.Net;
30using System.Net.Sockets; 29using System.Net.Sockets;
31using libsecondlife.Packets; 30using libsecondlife.Packets;
32using OpenSim.Framework; 31using OpenSim.Framework;
33using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
34using OpenSim.Framework;
35using OpenSim.Framework.Interfaces;
36using libsecondlife;
37 33
38namespace OpenSim.Region.ClientStack 34namespace OpenSim.Region.ClientStack
39{ 35{
@@ -56,10 +52,7 @@ namespace OpenSim.Region.ClientStack
56 52
57 public IScene LocalScene 53 public IScene LocalScene
58 { 54 {
59 set 55 set { m_scene = value; }
60 {
61 this.m_scene = value;
62 }
63 } 56 }
64 57
65 /// <summary> 58 /// <summary>
@@ -72,17 +65,21 @@ namespace OpenSim.Region.ClientStack
72 m_scene.ClientManager.InPacket(circuitCode, packet); 65 m_scene.ClientManager.InPacket(circuitCode, packet);
73 } 66 }
74 67
75 protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) 68 protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack,
69 ClientManager clientManager, IScene scene, AssetCache assetCache,
70 PacketServer packServer, AgentCircuitManager authenSessions)
76 { 71 {
77 return new ClientView(remoteEP, initialcirpack, clientManager, scene, assetCache, packServer, authenSessions ); 72 return
73 new ClientView(remoteEP, initialcirpack, clientManager, scene, assetCache, packServer, authenSessions);
78 } 74 }
79 75
80 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, AgentCircuitManager authenticateSessionsClass) 76 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache,
77 AgentCircuitManager authenticateSessionsClass)
81 { 78 {
82 IClientAPI newuser; 79 IClientAPI newuser;
83 80
84 if (m_scene.ClientManager.TryGetClient(useCircuit.CircuitCode.Code, out newuser)) 81 if (m_scene.ClientManager.TryGetClient(useCircuit.CircuitCode.Code, out newuser))
85 { 82 {
86 return false; 83 return false;
87 } 84 }
88 else 85 else
@@ -104,7 +101,7 @@ namespace OpenSim.Region.ClientStack
104 { 101 {
105 client.SendLogoutPacket(); 102 client.SendLogoutPacket();
106 103
107 CloseClient( client ); 104 CloseClient(client);
108 } 105 }
109 106
110 107
@@ -117,7 +114,7 @@ namespace OpenSim.Region.ClientStack
117 /// <param name="circuitcode"></param> 114 /// <param name="circuitcode"></param>
118 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) 115 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
119 { 116 {
120 this.m_networkHandler.SendPacketTo(buffer, size, flags, circuitcode); 117 m_networkHandler.SendPacketTo(buffer, size, flags, circuitcode);
121 } 118 }
122 119
123 /// <summary> 120 /// <summary>
@@ -126,13 +123,13 @@ namespace OpenSim.Region.ClientStack
126 /// <param name="circuitcode"></param> 123 /// <param name="circuitcode"></param>
127 public virtual void CloseCircuit(uint circuitcode) 124 public virtual void CloseCircuit(uint circuitcode)
128 { 125 {
129 m_networkHandler.RemoveClientCircuit( circuitcode ); 126 m_networkHandler.RemoveClientCircuit(circuitcode);
130 m_scene.ClientManager.CloseAllAgents(circuitcode); 127 m_scene.ClientManager.CloseAllAgents(circuitcode);
131 } 128 }
132 129
133 public virtual void CloseClient( IClientAPI client ) 130 public virtual void CloseClient(IClientAPI client)
134 { 131 {
135 CloseCircuit( client.CircuitCode ); 132 CloseCircuit(client.CircuitCode);
136 } 133 }
137 } 134 }
138} 135} \ No newline at end of file