aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ClientManager.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-13 18:56:54 -0700
committerJohn Hurliman2009-10-13 18:56:54 -0700
commite8c1e69a0dbab1a7db894eeff6b052bbd350a8f5 (patch)
tree6d29a3bae418c1c5a06e3f1b8ad4a59db57a8d9e /OpenSim/Framework/ClientManager.cs
parent* Consolidated adding / removing ClientManager IClientAPIs to two places in S... (diff)
downloadopensim-SC_OLD-e8c1e69a0dbab1a7db894eeff6b052bbd350a8f5.zip
opensim-SC_OLD-e8c1e69a0dbab1a7db894eeff6b052bbd350a8f5.tar.gz
opensim-SC_OLD-e8c1e69a0dbab1a7db894eeff6b052bbd350a8f5.tar.bz2
opensim-SC_OLD-e8c1e69a0dbab1a7db894eeff6b052bbd350a8f5.tar.xz
* Copied LocklessQueue.cs into OpenSim.Framework and added the .Count property and .Clear() method
* Changed the way the QueueEmpty callback is fired. It will be fired asynchronously as soon as an empty queue is detected (this can happen immediately following a dequeue), and will not be fired again until at least one packet is dequeued from that queue. This will give callbacks advanced notice of an empty queue and prevent callbacks from stacking up while the queue is empty * Added LLUDPClient.IsConnected checks in several places to prevent unwanted network activity after a client disconnects * Prevent LLClientView.Close() from being called twice every disconnect * Removed the packet resend limit and improved the client timeout check
Diffstat (limited to 'OpenSim/Framework/ClientManager.cs')
-rw-r--r--OpenSim/Framework/ClientManager.cs23
1 files changed, 9 insertions, 14 deletions
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index fd5f87f..367bc6a 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -121,20 +121,10 @@ namespace OpenSim.Framework
121 /// <summary> 121 /// <summary>
122 /// Remove a client from the collection 122 /// Remove a client from the collection
123 /// </summary> 123 /// </summary>
124 /// <param name="value">Reference to the client object</param> 124 /// <param name="key">UUID of the client to remove</param>
125 public void Remove(IClientAPI value) 125 /// <returns>True if a client was removed, or false if the given UUID
126 { 126 /// was not present in the collection</returns>
127 lock (m_writeLock) 127 public bool Remove(UUID key)
128 {
129 if (m_dict.ContainsKey(value.AgentId))
130 m_dict = m_dict.Delete(value.AgentId);
131
132 if (m_dict2.ContainsKey(value.RemoteEndPoint))
133 m_dict2 = m_dict2.Delete(value.RemoteEndPoint);
134 }
135 }
136
137 public void Remove(UUID key)
138 { 128 {
139 lock (m_writeLock) 129 lock (m_writeLock)
140 { 130 {
@@ -144,6 +134,11 @@ namespace OpenSim.Framework
144 { 134 {
145 m_dict = m_dict.Delete(key); 135 m_dict = m_dict.Delete(key);
146 m_dict2 = m_dict2.Delete(client.RemoteEndPoint); 136 m_dict2 = m_dict2.Delete(client.RemoteEndPoint);
137 return true;
138 }
139 else
140 {
141 return false;
147 } 142 }
148 } 143 }
149 } 144 }