• 大小: 0.05M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: 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.Threading;
using System.Net.Sockets;
using System.Net;
using System.Diagnostics;

namespace SocketClient
{
    public partial class Main : Form
    {
        //创建 1个客户端套接字 和1个负责监听服务端请求的线程  
        Thread threadclient = null;
        Socket socketclient = null;

        public Main()
        {
            InitializeComponent();

            StartPosition = FormStartPosition.CenterScreen;
            //关闭对文本框的非法线程操作检查  
            TextBox.CheckForIllegalCrossThreadCalls = false;

            this.btnSendMessage.Enabled = false;
            this.btnSendMessage.Visible

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

     文件         77  2017-09-04 22:27  SocketServerAcceptMultipleClient\App.config

     文件       7680  2017-09-04 23:26  SocketServerAcceptMultipleClient\bin\Debug\SocketServerAcceptMultipleClient.exe

     文件         77  2017-09-04 22:27  SocketServerAcceptMultipleClient\bin\Debug\SocketServerAcceptMultipleClient.exe.config

     文件      13824  2017-09-04 23:26  SocketServerAcceptMultipleClient\bin\Debug\SocketServerAcceptMultipleClient.pdb

     文件       5794  2017-09-04 23:27  SocketServerAcceptMultipleClient\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        537  2017-09-04 23:26  SocketServerAcceptMultipleClient\obj\Debug\SocketServerAcceptMultipleClient.csproj.FileListAbsolute.txt

     文件       7680  2017-09-04 23:26  SocketServerAcceptMultipleClient\obj\Debug\SocketServerAcceptMultipleClient.exe

     文件      13824  2017-09-04 23:26  SocketServerAcceptMultipleClient\obj\Debug\SocketServerAcceptMultipleClient.pdb

     文件       1406  2017-09-04 22:13  SocketServerAcceptMultipleClient\Properties\AssemblyInfo.cs

     文件       6234  2017-09-04 23:25  SocketServerAcceptMultipleClient\SocketServer.cs

     文件       2482  2017-09-04 22:42  SocketServerAcceptMultipleClient\SocketServerAcceptMultipleClient.csproj

     文件       6030  2017-09-04 22:42  PokerGame.sln

     文件        144  2017-09-04 22:27  SocketClient\app.config

     文件       9216  2017-09-04 23:25  SocketClient\bin\Debug\SocketClient.exe

     文件        144  2017-09-04 22:27  SocketClient\bin\Debug\SocketClient.exe.config

     文件      17920  2017-09-04 23:25  SocketClient\bin\Debug\SocketClient.pdb

     文件      11600  2017-09-04 22:45  SocketClient\bin\Debug\SocketClient.vshost.exe

     文件        144  2017-09-04 22:27  SocketClient\bin\Debug\SocketClient.vshost.exe.config

     文件        490  2015-10-22 09:54  SocketClient\bin\Debug\SocketClient.vshost.exe.manifest

     文件       5003  2017-09-04 22:42  SocketClient\Main.cs

     文件       3886  2017-09-04 22:39  SocketClient\Main.Designer.cs

     文件       5817  2017-09-04 22:39  SocketClient\Main.resx

     文件       5957  2017-09-04 23:25  SocketClient\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        522  2017-09-04 23:25  SocketClient\obj\x86\Debug\SocketClient.csproj.FileListAbsolute.txt

     文件        901  2017-09-04 23:25  SocketClient\obj\x86\Debug\SocketClient.csproj.GenerateResource.Cache

     文件       9216  2017-09-04 23:25  SocketClient\obj\x86\Debug\SocketClient.exe

     文件        180  2017-09-04 23:25  SocketClient\obj\x86\Debug\SocketClient.Main.resources

     文件      17920  2017-09-04 23:25  SocketClient\obj\x86\Debug\SocketClient.pdb

     文件        583  2017-09-04 22:36  SocketClient\Program.cs

     文件       1366  2017-09-04 22:27  SocketClient\Properties\AssemblyInfo.cs

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

评论

共有 条评论