title: How to configure socket connect timeout
body: <p>When the Client tries to connect to a disconnected IP address, there is a long timeout over 15 seconds... How can we reduce this timeout? What is the method to configure it?</p>
  
  <p>The code I'm using to set up a socket connection is as following: </p>
  
  <pre><code>try
  {
      m_clientSocket = new Socket(
           AddressFamily.InterNetwork,
           SocketType.Stream,
           ProtocolType.Tcp);
  
      IPAddress ip = IPAddress.Parse(serverIp);
      int iPortNo = System.Convert.ToInt16(serverPort);
      IPEndPoint ipEnd = new IPEndPoint(ip, iPortNo);
  
      m_clientSocket.Connect(ipEnd);
      if (m_clientSocket.Connected)
      {
          lb_connectStatus.Text = "Connection Established";
          WaitForServerData();
      }
  }
  catch (SocketException se)
  {
      lb_connectStatus.Text = "Connection Failed";
      MessageBox.Show(se.Message);
  }
  </code></pre>