1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
0/5,

im stuck on trying to set up serv uo up so others can log on to it

Summary of the tutorial

Code (C#):
  1. using System;
  2. using System.Net;
  3. using System.Net.Sockets;
  4. using Server.Network;
  5.  
  6. namespace Server
  7. {
  8.   public class SocketOptions
  9.   {
  10.   private static readonly IPEndPoint[] m_ListenerEndPoints = new IPEndPoint[]
  11.   {
  12.   new IPEndPoint(IPAddress.Any, 2593), // Default: Listen on port 2593 on all IP addresses
  13.      
  14.   // Examples:
  15.   // new IPEndPoint( IPAddress.Any, 80 ), // Listen on port 80 on all IP addresses
  16.   // new IPEndPoint( IPAddress.Parse( "1.2.3.4" ), 2593 ), // Listen on port 2593 on IP address 1.2.3.4
  17.   };
  18.   private const bool NagleEnabled = false;// Should the Nagle algorithm be enabled? This may reduce performance
  19.   private const int CoalesceBufferSize = 512;// MSS that the core will use when buffering packets
  20.   public static void Initialize()
  21.   {
  22.   SendQueue.CoalesceBufferSize = CoalesceBufferSize;
  23.  
  24.   EventSink.SocketConnect += new SocketConnectEventHandler(EventSink_SocketConnect);
  25.  
  26.   Listener.EndPoints = m_ListenerEndPoints;
  27.   }
  28.  
  29.   private static void EventSink_SocketConnect(SocketConnectEventArgs e)
  30.   {
  31.   if (!e.AllowConnection)
  32.   return;
  33.  
  34.   if (!NagleEnabled)
  35.   e.Socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1); // RunUO uses its own algorithm
  36.   }
  37.   }
  38. }
What part do i have to change?