i want to send a large data (image) approx . 1MB file though a socket connection
Question 1
following code snippet of the socket client which i currently use to send a a text message .. how i can modify this to send a file ?
 NetworkStream serverStream = clientSocket.GetStream();
    byte[] outStream = System.Text.Encoding.ASCII.GetBytes(richTextBox1.Text+"$");
    serverStream.Write(outStream, 0, outStream.Length);
    serverStream.Flush();
Question 2 : What modifications that required in both socket client and server to send and get large files ?