91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0.30M
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2024-04-27
  • 語言: C#
  • 標簽: TCP/IP??tcp??通訊??IP??

資源簡介

TCP/IP通訊 有客戶端與服務端

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Net.Sockets;
using?System.Net;
using?System.IO;
using?System.Threading;

namespace?client
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????public?TcpClient?TcpClient;????????
????????StreamReader?ClientReader;
????????StreamWriter?ClientWriter;
????????NetworkStream?Stream;
????????Thread?Thd;

????????private?void?btn_Click(object?sender?EventArgs?e)
????????{
????????????try
????????????{
????????????????????if(Stream.DataAvailable)
????????????????????{
????????????????????????rtxChatInfo.AppendText(?DateTime.Now.ToString());
????????????????????????rtxChatInfo.AppendText(“?服務器說:\n“);
????????????????????????rtxChatInfo.AppendText(ClientReader.ReadLine()+“\n“?);
????????????????????????//下拉框
????????????????????????rtxChatInfo.Selectionstart?=?rtxChatInfo.Text.Length;
????????????????????????rtxChatInfo.Focus();
????????????????????????rtxSendMessage.Focus();
????????????????????}
????????????}
????????????catch?
????????????{

????????????????//MessageBox.Show(ex.ToString());
????????????}
????????}

????????private?void?timer1_Tick(object?sender?EventArgs?e)
????????{
????????????btn_Click(sender?e);
????????}

????????private?void?Form1_FormClosing(object?sender?FormClosingEventArgs?e)
????????{
????????????DialogResult?dr?=?MessageBox.Show(“這樣會中斷與服務器的連接你要關閉該窗體嗎?“?“客戶端信息“?MessageBoxButtons.YesNo?MessageBoxIcon.Warning);?;
????????????if?(DialogResult.Yes?==?dr)
????????????{
????????????????e.Cancel?=?false;
????????????????Thd.Abort();
???????????????
????????????}
????????????else
????????????{
????????????????e.Cancel?=?true;
????????????}
???????????
????????}

????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
??????????//??skinEngine1.SkinFile?=?“MP10.ssk“;
????????}

????????private?void?btnClose_Click(object?sender?EventArgs?e)
????????{
????????????if?(MessageBox.Show(“你確定要關閉嗎?“?“提示“?MessageBoxButtons.OKCancel?MessageBoxIcon.Information)?==?DialogResult.OK)
????????????{
????????????????this.Close();
????????????}
????????}

????????private?void?btnConnect_Click(object?sender?EventArgs?e)
????????{
????????????if?(txtServerIp.Text.Trim()?==?““)
????????????{
????????????????MessageBox.Show(“請輸入服務器IP“?“客戶端信息“?MessageBoxButtons.OK?MessageBoxIcon.Error);
????????????????return;
????????????}
????????????else
????????????{
????????????????Thd?=?new?Thread(new?ThreadStart(GetConn));
????????????????Thd.Start();
????????????}
????????}
????????public?void?GetConn()
????????{
????????????CheckForIllegalCrossThreadCalls?=?false;
????????????while?(true)
????????????{
????????????????try
????????????????{
????????????????????TcpClient?=?new?TcpClie

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-10-23?13:32??TCP通訊\
?????目錄???????????0??2020-10-23?13:33??TCP通訊\client\
?????目錄???????????0??2020-10-23?13:32??TCP通訊\client\Backup\
?????目錄???????????0??2020-10-23?13:32??TCP通訊\client\Backup\client\
?????文件????????9911??2012-10-09?11:40??TCP通訊\client\Backup\client\Form1.Designer.cs
?????文件????????5346??2012-10-09?11:40??TCP通訊\client\Backup\client\Form1.cs
?????文件????????6203??2012-10-09?11:40??TCP通訊\client\Backup\client\Form1.resx
?????文件?????????465??2012-10-09?11:40??TCP通訊\client\Backup\client\Program.cs
?????目錄???????????0??2020-10-23?13:32??TCP通訊\client\Backup\client\Properties\
?????文件????????1190??2012-10-09?11:40??TCP通訊\client\Backup\client\Properties\AssemblyInfo.cs
?????文件????????2866??2012-10-09?11:40??TCP通訊\client\Backup\client\Properties\Resources.Designer.cs
?????文件????????5612??2012-10-09?11:40??TCP通訊\client\Backup\client\Properties\Resources.resx
?????文件????????1089??2012-10-09?11:40??TCP通訊\client\Backup\client\Properties\Settings.Designer.cs
?????文件?????????249??2012-10-09?11:40??TCP通訊\client\Backup\client\Properties\Settings.settings
?????文件????????3330??2012-10-09?11:40??TCP通訊\client\Backup\client\client.csproj
?????文件?????????168??2012-10-09?11:40??TCP通訊\client\Backup\client\client.csproj.user
?????文件?????????907??2012-10-09?11:40??TCP通訊\client\Backup\client.sln
?????文件???????17408??2012-10-09?11:40??TCP通訊\client\Backup\client.suo
?????目錄???????????0??2020-10-23?13:33??TCP通訊\client\Backup1\
?????目錄???????????0??2020-10-23?13:33??TCP通訊\client\Backup1\client\
?????文件????????9870??2012-10-11?13:31??TCP通訊\client\Backup1\client\Form1.Designer.cs
?????文件????????5334??2012-11-09?17:32??TCP通訊\client\Backup1\client\Form1.cs
?????文件????????6185??2012-10-11?22:24??TCP通訊\client\Backup1\client\Form1.resx
?????文件?????????465??2012-10-09?11:40??TCP通訊\client\Backup1\client\Program.cs
?????目錄???????????0??2020-10-23?13:33??TCP通訊\client\Backup1\client\Properties\
?????文件????????1190??2012-10-09?11:40??TCP通訊\client\Backup1\client\Properties\AssemblyInfo.cs
?????文件????????2836??2012-10-09?11:40??TCP通訊\client\Backup1\client\Properties\Resources.Designer.cs
?????文件????????5612??2012-10-09?11:40??TCP通訊\client\Backup1\client\Properties\Resources.resx
?????文件????????1104??2012-10-09?11:40??TCP通訊\client\Backup1\client\Properties\Settings.Designer.cs
?????文件?????????249??2012-10-09?11:40??TCP通訊\client\Backup1\client\Properties\Settings.settings
?????文件????????3538??2012-10-09?11:40??TCP通訊\client\Backup1\client\client.csproj
............此處省略132個文件信息

評論

共有 條評論