資源簡介
實現了服務器端消息監聽 以及 客戶端消息發送
代碼片段和文件信息
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個文件信息
- 上一篇:android連接數據庫(后端為c#)
- 下一篇:C# 接收微信公眾號返回消息
評論
共有 條評論