title: ObjectDisposeException when trying to send through a reopened socket
body: <ol>
  <li>I'm using <code>Socket</code> (<code>Socket A = new Socket...</code>) to send/receive.</li>
  <li>when something bed happens (disconnection), I'm trying to close/dispose old object, and then instancing a new socket (<code>A = new Socket...</code>) (same host/port)</li>
  <li>The <code>connect()</code> phase checks out fine, the remote host sees the connection.</li>
  <li>Upon trying to send the very first byte, I immediately get:</li>
  </ol>
  <blockquote>
  <p>System.ObjectDisposedException: Cannot access a disposed object.
  Object name: 'System.Net.Sockets.Socket'.
  at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, SocketError&amp; errorCode)
  at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
  at System.Net.Sockets.Socket.Send(Byte[] buffer)</p>
  </blockquote>
  <p>Any Ideas?</p>
  <pre><code>try
  {
     CCMSocket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true);
     CCMSocket.Connect(CCMServer, CCMPort);
  }
  </code></pre>
  <p>Now, when working with the socket, the catch clause catches <code>SocketException</code>, and calls the reconnect method:</p>
  <pre><code>try
  {
      //Verify the the socket is actually disconnected
      byte[] Empty = new byte[0];
      CCMSocket.Send(Empty);
  }
  catch (Exception ex)
  {
      bool connected = false;
      int reconnectCounter = 0;
      do
      {
          reconnectCounter++;
          Disconnect(); //&lt;-- Just CCMSocket.Disconnect(true) in a try/catch
          if (Connect(CCMServer, CCMPort)) // &lt;-- method given above
          {
              connected = true;
              CCMSocket.Send(LoginData); // this fails
          }
      } while (!connected);    
  }
  </code></pre>