资源简介

TCP客户端服务器通讯

资源截图

代码片段和文件信息

using System;
using System.Windows.Forms;
//添加的命名空间引用
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.IO;
namespace SyncChatClient
{
    public partial class MainForm : Form
    {
        private bool isExit = false;
        private TcpClient client;
        private BinaryReader br;
        private BinaryWriter bw;
        public MainForm()
        {
            InitializeComponent();
            Random r = new Random((int)DateTime.Now.Ticks);
            textBoxUserName.Text = “user“ + r.Next(100 999);
            listBoxOnlineStatus.HorizontalScrollbar = true;

        }
        /// 
        /// 【连接服务器】按钮的Click事件
        /// 

        private void buttonConnect_Click(object sender EventArgs e)
        {
    

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

     文件       1428  2010-07-16 11:57  Chap51TcpSyncChat\Chap51TcpSyncChat.sln

    ..A..H.     25600  2010-10-19 16:09  Chap51TcpSyncChat\Chap51TcpSyncChat.suo

     文件      13824  2009-12-06 21:59  Chap51TcpSyncChat\SyncChatClient\bin\Debug\SyncChatClient.exe

     文件      42496  2009-12-06 21:59  Chap51TcpSyncChat\SyncChatClient\bin\Debug\SyncChatClient.pdb

     文件      14328  2009-12-06 22:07  Chap51TcpSyncChat\SyncChatClient\bin\Debug\SyncChatClient.vshost.exe

     文件        490  2007-07-21 01:33  Chap51TcpSyncChat\SyncChatClient\bin\Debug\SyncChatClient.vshost.exe.manifest

     文件       8070  2010-07-29 11:26  Chap51TcpSyncChat\SyncChatClient\MainForm.cs

     文件       7954  2009-04-10 20:35  Chap51TcpSyncChat\SyncChatClient\MainForm.Designer.cs

     文件       5814  2009-04-10 20:35  Chap51TcpSyncChat\SyncChatClient\MainForm.resx

     文件       3674  2010-07-16 15:46  Chap51TcpSyncChat\SyncChatClient\obj\Debug\SyncChatClient.csproj.FileListAbsolute.txt

     文件        850  2010-07-16 15:46  Chap51TcpSyncChat\SyncChatClient\obj\Debug\SyncChatClient.csproj.GenerateResource.Cache

     文件      13824  2010-07-16 16:07  Chap51TcpSyncChat\SyncChatClient\obj\Debug\SyncChatClient.exe

     文件        180  2010-07-16 15:46  Chap51TcpSyncChat\SyncChatClient\obj\Debug\SyncChatClient.MainForm.resources

     文件      30208  2010-07-16 16:07  Chap51TcpSyncChat\SyncChatClient\obj\Debug\SyncChatClient.pdb

     文件        180  2010-07-16 15:46  Chap51TcpSyncChat\SyncChatClient\obj\Debug\SyncChatClient.Properties.Resources.resources

     文件       4608  2009-04-08 01:40  Chap51TcpSyncChat\SyncChatClient\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件         60  2008-05-05 00:01  Chap51TcpSyncChat\SyncChatClient\obj\SyncChatClient.csproj.FileList.txt

     文件       2704  2008-08-31 03:01  Chap51TcpSyncChat\SyncChatClient\obj\SyncChatClient.csproj.FileListAbsolute.txt

     文件        476  2008-03-20 00:33  Chap51TcpSyncChat\SyncChatClient\Program.cs

     文件       1200  2008-03-20 00:33  Chap51TcpSyncChat\SyncChatClient\Properties\AssemblyInfo.cs

     文件       2852  2008-09-08 12:59  Chap51TcpSyncChat\SyncChatClient\Properties\Resources.Designer.cs

     文件       5612  2008-03-20 00:33  Chap51TcpSyncChat\SyncChatClient\Properties\Resources.resx

     文件       1112  2008-09-08 12:59  Chap51TcpSyncChat\SyncChatClient\Properties\Settings.Designer.cs

     文件        249  2008-03-20 00:33  Chap51TcpSyncChat\SyncChatClient\Properties\Settings.settings

     文件       3451  2010-07-16 11:58  Chap51TcpSyncChat\SyncChatClient\SyncChatClient.csproj

     文件      13824  2010-07-16 16:07  Chap51TcpSyncChat\SyncChatClient.exe

     文件      30208  2010-07-16 16:07  Chap51TcpSyncChat\SyncChatClient.pdb

     文件      13824  2010-07-16 11:52  Chap51TcpSyncChat\SyncChatServer\bin\Debug\SyncChatServer.exe

     文件      44544  2010-07-16 11:52  Chap51TcpSyncChat\SyncChatServer\bin\Debug\SyncChatServer.pdb

     文件        490  2007-07-21 01:33  Chap51TcpSyncChat\SyncChatServer\bin\Debug\SyncChatServer.vshost.exe.manifest

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

评论

共有 条评论