• 大小: 0.13M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: tcp  C#  源码  通信  

资源简介

.NET 实现的TCP server和TCP Client源码

资源截图

代码片段和文件信息

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.Threading;
namespace TCPClient
{
    public partial class Form1 : Form
    {
        public Socket newclient;
        public bool Connected;
        public Thread myThread;
        public delegate void MyInvoke(string str);
        public Form1()
        {
            InitializeComponent();
            
        }
        public void Connect()
        {
            byte[] data = new byte[1024];
            newclient = new Socket(AddressFamily.InterNetwork SocketType.Stream ProtocolType.Tcp);
            string ipadd = server

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

     文件        144  2011-10-12 12:42  TCPServer\app.config

     文件      13824  2012-04-27 21:47  TCPServer\bin\Debug\TCPServer.exe

     文件        144  2011-10-12 12:42  TCPServer\bin\Debug\TCPServer.exe.config

     文件      40448  2012-04-27 21:47  TCPServer\bin\Debug\TCPServer.pdb

     文件      11592  2012-04-27 21:48  TCPServer\bin\Debug\TCPServer.vshost.exe

     文件        144  2011-10-12 12:42  TCPServer\bin\Debug\TCPServer.vshost.exe.config

     文件        490  2010-03-17 22:39  TCPServer\bin\Debug\TCPServer.vshost.exe.manifest

     文件       7830  2010-06-03 00:24  TCPServer\Form1.cs

     文件       7086  2010-06-02 21:07  TCPServer\Form1.Designer.cs

     文件       6014  2010-06-02 21:07  TCPServer\Form1.resx

     文件       5878  2012-04-27 21:47  TCPServer\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        814  2012-04-27 21:47  TCPServer\obj\Debug\GenerateResource-ResGen.read.1.tlog

     文件       1586  2012-04-27 21:47  TCPServer\obj\Debug\GenerateResource-ResGen.write.1.tlog

     文件          2  2012-04-27 21:47  TCPServer\obj\Debug\GenerateResource.read.1.tlog

     文件          2  2012-04-27 21:47  TCPServer\obj\Debug\GenerateResource.write.1.tlog

     文件       3229  2012-04-27 21:48  TCPServer\obj\Debug\TCPServer.csproj.FileListAbsolute.txt

     文件        847  2010-06-02 21:07  TCPServer\obj\Debug\TCPServer.csproj.GenerateResource.Cache

     文件      13824  2012-04-27 21:47  TCPServer\obj\Debug\TCPServer.exe

     文件        180  2012-04-27 21:47  TCPServer\obj\Debug\TCPServer.Form1.resources

     文件      40448  2012-04-27 21:47  TCPServer\obj\Debug\TCPServer.pdb

     文件        180  2012-04-27 21:47  TCPServer\obj\Debug\TCPServer.Properties.Resources.resources

     文件       4608  2011-10-12 12:42  TCPServer\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件        490  2010-05-30 18:21  TCPServer\Program.cs

     文件       1368  2010-05-30 18:21  TCPServer\Properties\AssemblyInfo.cs

     文件       2854  2011-10-12 12:42  TCPServer\Properties\Resources.Designer.cs

     文件       5612  2010-05-30 18:21  TCPServer\Properties\Resources.resx

     文件       1105  2011-10-12 12:42  TCPServer\Properties\Settings.Designer.cs

     文件        249  2010-05-30 18:21  TCPServer\Properties\Settings.settings

     文件        488  2010-05-31 12:35  TCPServer\Server.cs

     文件       4122  2011-10-12 12:42  TCPServer\TCPServer.csproj

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

评论

共有 条评论