aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r--OpenSim/Tests/Common/Mock/TestLLUDPServer.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs b/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
index 26887c9..388b56b 100644
--- a/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
+++ b/OpenSim/Tests/Common/Mock/TestLLUDPServer.cs
@@ -43,8 +43,8 @@ namespace OpenSim.Tests.Common
43 { 43 {
44 public List<Packet> PacketsSent { get; private set; } 44 public List<Packet> PacketsSent { get; private set; }
45 45
46 public TestLLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager) 46 public TestLLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, IConfigSource configSource, AgentCircuitManager circuitManager)
47 : base(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager) 47 : base(listenIP, ref port, proxyPortOffsetParm, configSource, circuitManager)
48 { 48 {
49 PacketsSent = new List<Packet>(); 49 PacketsSent = new List<Packet>();
50 } 50 }
@@ -73,7 +73,7 @@ namespace OpenSim.Tests.Common
73//// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive 73//// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive
74//// /// </summary> 74//// /// </summary>
75//// protected Queue<ChunkSenderTuple> m_chunksToLoad = new Queue<ChunkSenderTuple>(); 75//// protected Queue<ChunkSenderTuple> m_chunksToLoad = new Queue<ChunkSenderTuple>();
76// 76//
77//// protected override void BeginReceive() 77//// protected override void BeginReceive()
78//// { 78//// {
79//// if (m_chunksToLoad.Count > 0 && m_chunksToLoad.Peek().BeginReceiveException) 79//// if (m_chunksToLoad.Count > 0 && m_chunksToLoad.Peek().BeginReceiveException)
@@ -83,29 +83,29 @@ namespace OpenSim.Tests.Common
83//// throw new SocketException(); 83//// throw new SocketException();
84//// } 84//// }
85//// } 85//// }
86// 86//
87//// protected override bool EndReceive(out int numBytes, IAsyncResult result, ref EndPoint epSender) 87//// protected override bool EndReceive(out int numBytes, IAsyncResult result, ref EndPoint epSender)
88//// { 88//// {
89//// numBytes = 0; 89//// numBytes = 0;
90//// 90////
91//// //m_log.Debug("Queue size " + m_chunksToLoad.Count); 91//// //m_log.Debug("Queue size " + m_chunksToLoad.Count);
92//// 92////
93//// if (m_chunksToLoad.Count <= 0) 93//// if (m_chunksToLoad.Count <= 0)
94//// return false; 94//// return false;
95//// 95////
96//// ChunkSenderTuple tuple = m_chunksToLoad.Dequeue(); 96//// ChunkSenderTuple tuple = m_chunksToLoad.Dequeue();
97//// RecvBuffer = tuple.Data; 97//// RecvBuffer = tuple.Data;
98//// numBytes = tuple.Data.Length; 98//// numBytes = tuple.Data.Length;
99//// epSender = tuple.Sender; 99//// epSender = tuple.Sender;
100//// 100////
101//// return true; 101//// return true;
102//// } 102//// }
103// 103//
104//// public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) 104//// public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
105//// { 105//// {
106//// // Don't do anything just yet 106//// // Don't do anything just yet
107//// } 107//// }
108// 108//
109// /// <summary> 109// /// <summary>
110// /// Signal that this chunk should throw an exception on Socket.BeginReceive() 110// /// Signal that this chunk should throw an exception on Socket.BeginReceive()
111// /// </summary> 111// /// </summary>
@@ -116,7 +116,7 @@ namespace OpenSim.Tests.Common
116// tuple.BeginReceiveException = true; 116// tuple.BeginReceiveException = true;
117// m_chunksToLoad.Enqueue(tuple); 117// m_chunksToLoad.Enqueue(tuple);
118// } 118// }
119// 119//
120// /// <summary> 120// /// <summary>
121// /// Load some data to be received by the LLUDPServer on the next receive call 121// /// Load some data to be received by the LLUDPServer on the next receive call
122// /// </summary> 122// /// </summary>
@@ -126,7 +126,7 @@ namespace OpenSim.Tests.Common
126// { 126// {
127// m_chunksToLoad.Enqueue(new ChunkSenderTuple(data, epSender)); 127// m_chunksToLoad.Enqueue(new ChunkSenderTuple(data, epSender));
128// } 128// }
129// 129//
130// /// <summary> 130// /// <summary>
131// /// Load a packet to be received by the LLUDPServer on the next receive call 131// /// Load a packet to be received by the LLUDPServer on the next receive call
132// /// </summary> 132// /// </summary>
@@ -135,7 +135,7 @@ namespace OpenSim.Tests.Common
135// { 135// {
136// LoadReceive(packet.ToBytes(), epSender); 136// LoadReceive(packet.ToBytes(), epSender);
137// } 137// }
138// 138//
139// /// <summary> 139// /// <summary>
140// /// Calls the protected asynchronous result method. This fires out all data chunks currently queued for send 140// /// Calls the protected asynchronous result method. This fires out all data chunks currently queued for send
141// /// </summary> 141// /// </summary>
@@ -147,7 +147,7 @@ namespace OpenSim.Tests.Common
147//// OnReceivedData(result); 147//// OnReceivedData(result);
148// } 148// }
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// Record the data and sender tuple 152 /// Record the data and sender tuple
153 /// </summary> 153 /// </summary>
@@ -156,13 +156,13 @@ namespace OpenSim.Tests.Common
156 public byte[] Data; 156 public byte[] Data;
157 public EndPoint Sender; 157 public EndPoint Sender;
158 public bool BeginReceiveException; 158 public bool BeginReceiveException;
159 159
160 public ChunkSenderTuple(byte[] data, EndPoint sender) 160 public ChunkSenderTuple(byte[] data, EndPoint sender)
161 { 161 {
162 Data = data; 162 Data = data;
163 Sender = sender; 163 Sender = sender;
164 } 164 }
165 165
166 public ChunkSenderTuple(EndPoint sender) 166 public ChunkSenderTuple(EndPoint sender)
167 { 167 {
168 Sender = sender; 168 Sender = sender;