title: File Transfer with Maximum Speed on LAN
body: <p>Almost all of file transfer softwares like [NetSupport, Radmin, PcAnyWhere..] and also the different codes i used in my application, it slows down the transfer speed when you send alot of small sized files <strong>&lt; 1kb</strong> like <strong>Folder of a game</strong> that has alot of files.<br></p>
  
  <p>for example on a LAN (ethernet CAT5 cables) i send a single file, let say a video, the transfer rate is between 2MB and 9MB<br>
  but when i send a folder of a game that has alot of files the transfer rate is about 300kb-800kb</p>
  
  <p>as i guess it's because the way of sending a file:
  <li>Send File Info [file_path,file_Size].
  <li>Send file bytes [loop till end of the file].
  <li>End Transfer [ensure it received completely].</p>
  
  <p>but when you use the regular windows <strong>[copy-paste]</strong> on a shared folder on the network, the transfer rate of sending a folder is always fast like sending a single file.
  <br>
  so im trying to develop a file transfer application using [WCF service c# 4.0] that would use the maximum speed available on LAN, and I'm thinking about this way:</p>
  
  <pre><code>Get all files from the folder.
  if(FileSize&lt;1 MB)
  {
      Create additional thread to send;
      SendFile(FilePath);
  }
  else
  {
      Wait for the large file to be sent. // fileSize&gt;1MB
  }
  
  void SendFile(string path)  // a regular single file send.
  {
      SendFileInfo;
      Open Socket and wait for server application to connect;
      SendFileBytes;
      Dispose;
  }
  </code></pre>
  
  <p>but im confused about using more than one Socket for a file transfer, because that will use more ports and more time (delay of listening and accepting).</p>
  
  <p>so is it a good idea to do it?
  <br>need an explaination about if it's possible to do, how to do it, a better protocol than tcp that would meant for this.<br>
  thanks in advance.</p>