【ファイル受信コード】
/// <summary>
/// ファイルを受信する
/// </summary>
private void getFile()
{
// ファイル受信用ポートを開く
int port = this.clientPort + 1;
TcpClient newtcpC = new TcpClient();

newtcpC.Connect(this.clientIp, port);
NetworkStream netStream_n = newtcpC.GetStream();
FileStream fs = new FileStream(this.downFolderPath + @"\" + downFileName,
FileMode.OpenOrCreate,
FileAccess.Write);
byte[] bb = new byte[8];
while (netStream_n.Read(bb, 0, bb.Length) != 0)
{
fs.Write(bb, 0, bb.Length);
fs.Flush();
bb = new byte[8];
}
MessageBox.Show("ダウンロード完了!");
fs.Close();
netStream_n.Close();
newtcpC.Close();
}