• 大小: 7.49M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: Socket  OC  编程  发送  消息  

资源简介

socket编程,可发送消息、小于1M的文件

资源截图

代码片段和文件信息

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

namespace SocketCommunication
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();

            // 忽略对跨线程调用的检测在窗体构造函数中设置
            // Control.CheckForIllegalCrossThreadCalls = false;

            // 找到本地所有IP地址符合IPV4协议的IP地址
            IPAddress[] ipaArray = Dns.GetHostAddresses(Dns.GetHostName());
            foreach (IPAddress ipa in ipaArray)
            {
                if (ipa.AddressFamily == AddressFamily.InterNetwork)
 

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

    ..A..H.     16896  2019-11-29 15:33  SocketCommunication\.vs\SocketCommunication\v15\.suo

    ..A..H.     55296  2019-11-29 15:39  SocketCommunication\.vs\SocketCommunication\v16\.suo

     文件          0  2019-11-26 16:25  SocketCommunication\.vs\SocketCommunication\v16\Server\sqlite3\db.lock

     文件     577536  2019-11-29 15:39  SocketCommunication\.vs\SocketCommunication\v16\Server\sqlite3\storage.ide

     文件      18699  2019-11-25 20:55  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\.signature.p7s

     文件       2349  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props

     文件      28234  2019-11-25 19:03  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\documentation\Analyzer Configuration.md

     文件      82934  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\documentation\Microsoft.CodeAnalysis.FxCopAnalyzers.md

     文件     203428  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\documentation\Microsoft.CodeAnalysis.FxCopAnalyzers.sarif

     文件      20792  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\AllRulesDefault\.editorconfig

     文件      20325  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\AllRulesDisabled\.editorconfig

     文件      21061  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\AllRulesEnabled\.editorconfig

     文件      20508  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\DataflowRulesDefault\.editorconfig

     文件      20643  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\DataflowRulesEnabled\.editorconfig

     文件      20562  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\DesignRulesDefault\.editorconfig

     文件      20666  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\DesignRulesEnabled\.editorconfig

     文件      20499  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\DocumentationRulesDefault\.editorconfig

     文件      20577  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\DocumentationRulesEnabled\.editorconfig

     文件      20514  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\GlobalizationRulesDefault\.editorconfig

     文件      20595  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\GlobalizationRulesEnabled\.editorconfig

     文件      20508  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\InteroperabilityRulesDefault\.editorconfig

     文件      20589  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\InteroperabilityRulesEnabled\.editorconfig

     文件      20505  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\MaintainabilityRulesDefault\.editorconfig

     文件      20603  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\MaintainabilityRulesEnabled\.editorconfig

     文件      20505  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\NamingRulesDefault\.editorconfig

     文件      20585  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\NamingRulesEnabled\.editorconfig

     文件      20541  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\PerformanceRulesDefault\.editorconfig

     文件      20620  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\PerformanceRulesEnabled\.editorconfig

     文件      20749  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\PortedFromFxCopRulesDefault\.editorconfig

     文件      20888  2019-11-25 19:09  SocketCommunication\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.8\editorconfig\PortedFromFxCopRulesEnabled\.editorconfig

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

评论

共有 条评论