c# socket send file <p>im trying to use the <code>SendFile</code> method <a href="https://msdn.microsoft.com/en-us/library/sx0a40c2(v=vs.110).aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/sx0a40c2(v=vs.110).aspx</a></p> <pre><code> TcpClient client; private void Form1_Load(object sender, EventArgs e) { client = new TcpClient(); client.Connect("10.0.0.1", 10); string fileName = @"C:\Users\itapi\Desktop\da.jpg"; Console.WriteLine("Sending {0} to the host.", fileName); client.Client.SendFile(fileName); } </code></pre> <p>server code:</p> <pre><code> TcpListener listener; TcpClient cl; private void Form1_Load(object sender, EventArgs e) { listener = new TcpListener(IPAddress.Any, 10); listener.Start(); cl = listener.AcceptTcpClient(); } </code></pre> <p>my question is: how i am supposed to get the file in the other side? i dont want to use networkstream only pure socket. any help would be apperciated</p>