• 大小: 0.57M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-02-27
  • 语言: C#
  • 标签: Socket  async  

资源简介

基于IOCP的网络编程。带服务端和客户端。代码已经封装好。可以直接使用

资源截图

代码片段和文件信息

using SocketHelper;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ClientUnti
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Task.Factory.StartNew(sendHeart TaskCreationOptions.LongRunning);
            ChangeForm.ChangeFromEvent += changeForm;
        }
        ConcurrentDictionary sockets = new ConcurrentDictionary();
        private void changeForm(ChangeArgs args)
        {
            Invoke(new Action(() =>
            {
                if (!string.IsNullOrEmpty(args.ReceiveMessage))
                {
                    if (!isReceive)
                    {
                        

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

    ..A..H.    101376  2020-04-30 13:21  asyncsocket\SocketHelper\.vs\SocketHelper\v15\.suo

     文件          0  2020-04-19 17:05  asyncsocket\SocketHelper\.vs\SocketHelper\v15\Server\sqlite3\db.lock

     文件     630784  2020-04-25 09:04  asyncsocket\SocketHelper\.vs\SocketHelper\v15\Server\sqlite3\storage.ide

     文件      32768  2020-04-30 13:20  asyncsocket\SocketHelper\.vs\SocketHelper\v15\Server\sqlite3\storage.ide-shm

     文件    4227152  2020-04-26 10:52  asyncsocket\SocketHelper\.vs\SocketHelper\v15\Server\sqlite3\storage.ide-wal

    ..A..H.     53760  2020-04-26 15:25  asyncsocket\SocketHelper\ClientUnti\.vs\ClientUnti\v15\.suo

     文件          0  2020-04-19 17:56  asyncsocket\SocketHelper\ClientUnti\.vs\ClientUnti\v15\Server\sqlite3\db.lock

     文件     593920  2020-04-22 18:19  asyncsocket\SocketHelper\ClientUnti\.vs\ClientUnti\v15\Server\sqlite3\storage.ide

     文件      32768  2020-04-26 13:59  asyncsocket\SocketHelper\ClientUnti\.vs\ClientUnti\v15\Server\sqlite3\storage.ide-shm

     文件    4124152  2020-04-26 11:02  asyncsocket\SocketHelper\ClientUnti\.vs\ClientUnti\v15\Server\sqlite3\storage.ide-wal

     文件        187  2020-04-19 17:56  asyncsocket\SocketHelper\ClientUnti\ClientUnti\App.config

     文件      20480  2020-04-25 09:23  asyncsocket\SocketHelper\ClientUnti\ClientUnti\bin\Debug\ClientUnti.exe

     文件        187  2020-04-19 17:56  asyncsocket\SocketHelper\ClientUnti\ClientUnti\bin\Debug\ClientUnti.exe.config

     文件      48640  2020-04-25 09:23  asyncsocket\SocketHelper\ClientUnti\ClientUnti\bin\Debug\ClientUnti.pdb

     文件      16384  2020-04-25 09:16  asyncsocket\SocketHelper\ClientUnti\ClientUnti\bin\Debug\SocketHelper.dll

     文件      62976  2020-04-25 09:16  asyncsocket\SocketHelper\ClientUnti\ClientUnti\bin\Debug\SocketHelper.pdb

     文件       3667  2020-04-22 17:33  asyncsocket\SocketHelper\ClientUnti\ClientUnti\ClientUnti.csproj

     文件      10257  2020-04-25 09:23  asyncsocket\SocketHelper\ClientUnti\ClientUnti\Form1.cs

     文件      15629  2020-04-25 08:24  asyncsocket\SocketHelper\ClientUnti\ClientUnti\Form1.Designer.cs

     文件       6022  2020-04-25 08:24  asyncsocket\SocketHelper\ClientUnti\ClientUnti\Form1.resx

     文件          0  2020-04-25 09:23  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.csproj.CopyComplete

     文件         42  2020-04-22 17:26  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.csproj.CoreCompileInputs.cache

     文件       1588  2020-04-25 09:16  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.csproj.FileListAbsolute.txt

     文件       1012  2020-04-25 08:24  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.csproj.GenerateResource.cache

     文件      44458  2020-04-25 08:19  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.csprojAssemblyReference.cache

     文件      20480  2020-04-25 09:23  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.exe

     文件        180  2020-04-25 09:16  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.Form1.resources

     文件      48640  2020-04-25 09:23  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.pdb

     文件        180  2020-04-25 09:16  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\ClientUnti.Properties.Resources.resources

     文件       1431  2020-04-21 18:16  asyncsocket\SocketHelper\ClientUnti\ClientUnti\obj\Debug\DesignTimeResolveAssemblyReferences.cache

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

评论

共有 条评论