• 大小: 0.08M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: C#  文件  文件传输  c  

资源简介

利用tcp socket 通讯实现

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Threading;

namespace Receiver
{
    public partial class Form1 : Form
    {
        Thread worker;
        int port;
        public Form1()
        {
            InitializeComponent();
        }

        private void btnStartListen_Click(object sender EventArgs e)
        {
            port = int.Parse(txtPort.Text);
            btnStartListen.Enabled = false;
            btnCancel.Enabled = true;
            worker = new Thread(new ThreadStart(Start));
            worker.IsBackground = true;
           

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1386  2015-06-12 14:43  FileTransport\FileTransport.sln

    ..A..H.     19968  2015-06-12 15:52  FileTransport\FileTransport.suo

     文件      13312  2015-06-12 15:52  FileTransport\Receiver\bin\Debug\Receiver.exe

     文件      28160  2015-06-12 15:52  FileTransport\Receiver\bin\Debug\Receiver.pdb

     文件      14328  2015-06-12 15:51  FileTransport\Receiver\bin\Debug\Receiver.vshost.exe

     文件        490  2009-06-11 05:14  FileTransport\Receiver\bin\Debug\Receiver.vshost.exe.manifest

     文件       7502  2015-06-12 15:52  FileTransport\Receiver\Form1.cs

     文件       7147  2015-06-12 15:22  FileTransport\Receiver\Form1.Designer.cs

     文件       6219  2015-06-12 15:22  FileTransport\Receiver\Form1.resx

     文件        555  2015-06-12 15:52  FileTransport\Receiver\obj\Debug\Receiver.csproj.FileListAbsolute.txt

     文件        847  2015-06-12 15:52  FileTransport\Receiver\obj\Debug\Receiver.csproj.GenerateResource.Cache

     文件      13312  2015-06-12 15:52  FileTransport\Receiver\obj\Debug\Receiver.exe

     文件        180  2015-06-12 15:52  FileTransport\Receiver\obj\Debug\Receiver.Form1.resources

     文件      28160  2015-06-12 15:52  FileTransport\Receiver\obj\Debug\Receiver.pdb

     文件        180  2015-06-12 15:52  FileTransport\Receiver\obj\Debug\Receiver.Properties.Resources.resources

     文件        489  2015-06-12 13:37  FileTransport\Receiver\Program.cs

     文件       1366  2015-06-12 13:37  FileTransport\Receiver\Properties\AssemblyInfo.cs

     文件       2866  2015-06-12 13:37  FileTransport\Receiver\Properties\Resources.Designer.cs

     文件       5612  2015-06-12 13:37  FileTransport\Receiver\Properties\Resources.resx

     文件       1093  2015-06-12 13:37  FileTransport\Receiver\Properties\Settings.Designer.cs

     文件        249  2015-06-12 13:37  FileTransport\Receiver\Properties\Settings.settings

     文件       3762  2015-06-12 15:22  FileTransport\Receiver\Receiver.csproj

     文件      13312  2015-06-12 15:49  FileTransport\Sender\bin\Debug\Sender.exe

     文件      28160  2015-06-12 15:49  FileTransport\Sender\bin\Debug\Sender.pdb

     文件      14328  2015-06-12 15:43  FileTransport\Sender\bin\Debug\Sender.vshost.exe

     文件        490  2009-06-11 05:14  FileTransport\Sender\bin\Debug\Sender.vshost.exe.manifest

     文件       5874  2015-06-12 14:44  FileTransport\Sender\Form1.cs

     文件       7213  2015-06-12 14:43  FileTransport\Sender\Form1.Designer.cs

     文件       6218  2015-06-12 14:43  FileTransport\Sender\Form1.resx

     文件        525  2015-06-12 15:49  FileTransport\Sender\obj\Debug\Sender.csproj.FileListAbsolute.txt

............此处省略32个文件信息

评论

共有 条评论