title: Send data over the network C#
body: <p>I try to send a string over the network, this is my code:</p>
  
  <pre><code> IPEndPoint serverEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 25);
  
      TcpClient client = new TcpClient(serverEndPoint);
      Socket socket = client.Client;
  
      byte[] data = Encoding.ASCII.GetBytes(response);
  
      socket.Send(data, data.Length, SocketFlags.None);
  
      socket.Close();
      client.Close();
  </code></pre>
  
  <p>When I run it I got System.Net.Sockets.SocketException </p>