aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
diff options
context:
space:
mode:
authorSean Dague2008-06-03 13:49:58 +0000
committerSean Dague2008-06-03 13:49:58 +0000
commite713a3c62a521920b39a8f30fe9658cacc74eb3b (patch)
treedd9fbebbc2d1dd428f5d4798131c7e844e722a8a /OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
parent* minor: Attempted method documentation clarifications related to last two co... (diff)
downloadopensim-SC_OLD-e713a3c62a521920b39a8f30fe9658cacc74eb3b.zip
opensim-SC_OLD-e713a3c62a521920b39a8f30fe9658cacc74eb3b.tar.gz
opensim-SC_OLD-e713a3c62a521920b39a8f30fe9658cacc74eb3b.tar.bz2
opensim-SC_OLD-e713a3c62a521920b39a8f30fe9658cacc74eb3b.tar.xz
From: Dong Jun Lan <landj@cn.ibm.com>
Set udp flags correctly to prevent "Socket forcibly closed by host" errors.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 5fbc7c0..7f221ae 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -408,6 +408,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
408 ServerIncoming = new IPEndPoint(listenIP, (int)newPort); 408 ServerIncoming = new IPEndPoint(listenIP, (int)newPort);
409 m_socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 409 m_socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
410 m_socket.Bind(ServerIncoming); 410 m_socket.Bind(ServerIncoming);
411 // Add flags to the UDP socket to prevent "Socket forcibly closed by host"
412 uint IOC_IN = 0x80000000;
413 uint IOC_VENDOR = 0x18000000;
414 uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12;
415 m_socket.IOControl((int)SIO_UDP_CONNRESET, new byte[] { Convert.ToByte(false) }, null);
416
411 listenPort = newPort; 417 listenPort = newPort;
412 418
413 m_log.Info("[SERVER]: UDP socket bound, getting ready to listen"); 419 m_log.Info("[SERVER]: UDP socket bound, getting ready to listen");