• 大小: 0.13M
    文件类型: .zip
    金币: 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.Threading.Tasks;
using System.Windows.Forms;

namespace ClientBySocket
{
    public partial class ClientForm : Form
    {
        SocketClientManager _scm = null;
        string ip = “127.0.0.1“;
        int port = 1113;

        public ClientForm()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            InitSocket();
        }

        public void OnReceiveMsg()
        {
            byte[] buffer = _scm.socketInfo.buffer;
            string msg = Encoding.ASCII.GetString(buffer).Replace(“\0“ ““);
            

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-01-29 10:53  ClientBySocket\
     文件         187  2015-01-28 13:57  ClientBySocket\App.config
     目录           0  2015-01-28 18:49  ClientBySocket\bin\
     目录           0  2015-01-29 09:17  ClientBySocket\bin\Debug\
     文件       16896  2015-01-29 10:57  ClientBySocket\bin\Debug\ClientBySocket.exe
     文件         187  2015-01-28 13:57  ClientBySocket\bin\Debug\ClientBySocket.exe.config
     文件       38400  2015-01-29 10:57  ClientBySocket\bin\Debug\ClientBySocket.pdb
     文件       23168  2015-01-29 10:52  ClientBySocket\bin\Debug\ClientBySocket.vshost.exe
     文件         187  2015-01-28 13:57  ClientBySocket\bin\Debug\ClientBySocket.vshost.exe.config
     文件         490  2013-06-18 20:28  ClientBySocket\bin\Debug\ClientBySocket.vshost.exe.manifest
     目录           0  2015-01-28 18:49  ClientBySocket\bin\Release\
     文件        3883  2015-01-28 18:49  ClientBySocket\ClientBySocket.csproj
     文件        4235  2015-01-29 10:53  ClientBySocket\ClientForm.cs
     文件       10775  2015-01-29 09:35  ClientBySocket\ClientForm.Designer.cs
     文件        5817  2015-01-29 09:35  ClientBySocket\ClientForm.resx
     目录           0  2015-01-28 13:57  ClientBySocket\obj\
     目录           0  2015-01-29 10:57  ClientBySocket\obj\Debug\
     文件         180  2015-01-29 09:35  ClientBySocket\obj\Debug\ClientBySocket.ClientForm.resources
     文件        1019  2015-01-29 10:52  ClientBySocket\obj\Debug\ClientBySocket.csproj.FileListAbsolute.txt
     文件        1040  2015-01-29 09:35  ClientBySocket\obj\Debug\ClientBySocket.csproj.GenerateResource.Cache
     文件        2211  2015-01-28 14:33  ClientBySocket\obj\Debug\ClientBySocket.csprojResolveAssemblyReference.cache
     文件       16896  2015-01-29 10:57  ClientBySocket\obj\Debug\ClientBySocket.exe
     文件       38400  2015-01-29 10:57  ClientBySocket\obj\Debug\ClientBySocket.pdb
     文件         180  2015-01-28 18:49  ClientBySocket\obj\Debug\ClientBySocket.Properties.Resources.resources
     文件        1453  2015-01-28 15:08  ClientBySocket\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7087  2015-01-29 09:15  ClientBySocket\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件           0  2015-01-28 13:57  ClientBySocket\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2015-01-28 13:57  ClientBySocket\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
     文件           0  2015-01-28 13:57  ClientBySocket\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
     目录           0  2015-01-28 13:57  ClientBySocket\obj\Debug\TempPE\
     文件         531  2015-01-28 18:49  ClientBySocket\Program.cs
............此处省略48个文件信息

评论

共有 条评论