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

  • 大小: 75KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-29
  • 語言: C#
  • 標簽: c#apache??apollo??

資源簡介

c#實現消息推送,具體的配置和用法,請點擊本人的博客,http://www.cnblogs.com/xlxr45/p/7623587.html

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Net;
using?System.Net.Sockets;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?uPLibrary.Networking.M2Mqtt;
using?uPLibrary.Networking.M2Mqtt.Messages;

namespace?MqttCsharp
{
????public?partial?class?Form1?:?Form
????{
????????private??MqttClient?client;
????????private?string?topic?=?““;

????????private?delegate?void?MessDelegate(T?obj);
????????public?Form1()
????????{
????????????InitializeComponent();
????????????buttonLose.Enabled?=?false;
????????????buttonca.Enabled?=?false;
????????}

????????//連接apache?apollo
????????private?void?linkClick(object?sender?EventArgs?e)
????????{
????????????string?clientId?=?““;
????????????string?ip?=?““;
????????????string?port?=?““;
????????????if?(String.IsNullOrEmpty(textBoxCT.Text))
????????????{
????????????????MessageBox.Show(“請輸入客戶機標識!“);
????????????????return;
????????????}
????????????if?(String.IsNullOrEmpty(textBoxAD.Text)?&&?textBoxAD.Text.IndexOf(‘:‘)<=0)
????????????{
????????????????MessageBox.Show(“請輸入IP地址且帶端口號!“);
????????????????return;
????????????}
????????????clientId?=?textBoxCT.Text;
????????????ip?=?textBoxAD.Text.Substring(0textBoxAD.Text.IndexOf(‘:‘));
????????????port?=?textBoxAD.Text.Substring(textBoxAD.Text.IndexOf(‘:‘)+1);

????????????try
????????????{
????????????????client?=?new?MqttClient(IPAddress.Parse(ip)?Convert.ToInt32(port)?false?null);
????????????????client.Connect(clientId?“admin“?“password“?false?0x01?false?null?null?true?60);//admin和password是之前在apache?apollo中設置的用戶名和密碼
????????????????buttonlink.Enabled?=?false;
????????????????buttonLose.Enabled?=?true;
????????????????textBoxLS.ForeColor?=?Color.RoyalBlue;
????????????????textBoxLS.Text?=?“已連接“;
????????????}
????????????catch?(Exception?ee)
????????????{
????????????????MessageBox.Show(“無法連接,請確定代理服務器是否啟動,IP端口是否正確“);
????????????}

????????}
????????//斷開apache?apollo連接
????????private?void?Closelink(object?sender?EventArgs?e)
????????{
????????????if?(client?!=null?&&?client.IsConnected)
????????????{
????????????????client.Disconnect();
????????????????client?=?null;
????????????????buttonlink.Enabled?=?true;
????????????????buttonLose.Enabled?=?false;
????????????????textBoxLS.ForeColor?=?Color.Firebrick;
????????????????textBoxLS.Text?=?“斷開連接“;
????????????}

????????}
????????//發布按鈕的點擊時間
????????private?void?PublishSubmit(object?sender?EventArgs?e)
????????{
????????????string?pubtitle?=?““;//發布主題
????????????byte?pubQu?;//發布質量

????????????if?(String.IsNullOrEmpty(textBoxPuIt.Text))
????????????{
????????????????MessageBox.Show(“請輸入發布主題!“);
????????????????return;
????????????}
????????????if?(String.IsNullOrEmpty(comboBoxPub.Text))
????????????{
????????????????MessageBox.Show(“請選擇發布主題質量!“);
????????????????ret

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????187??2017-10-03?15:13??MqttCsharp\MqttCsharp\App.config

?????文件??????40448??2017-10-03?16:06??MqttCsharp\MqttCsharp\bin\Debug\M2Mqtt.dll

?????文件??????17408??2017-10-03?17:52??MqttCsharp\MqttCsharp\bin\Debug\MqttCsharp.exe

?????文件????????187??2017-10-03?15:13??MqttCsharp\MqttCsharp\bin\Debug\MqttCsharp.exe.config

?????文件??????30208??2017-10-03?17:52??MqttCsharp\MqttCsharp\bin\Debug\MqttCsharp.pdb

?????文件??????22984??2017-10-03?17:53??MqttCsharp\MqttCsharp\bin\Debug\MqttCsharp.vshost.exe

?????文件????????187??2017-10-03?15:13??MqttCsharp\MqttCsharp\bin\Debug\MqttCsharp.vshost.exe.config

?????文件????????490??2017-03-19?05:00??MqttCsharp\MqttCsharp\bin\Debug\MqttCsharp.vshost.exe.manifest

?????文件???????7186??2017-10-03?17:59??MqttCsharp\MqttCsharp\Form1.cs

?????文件??????18595??2017-10-03?17:48??MqttCsharp\MqttCsharp\Form1.Designer.cs

?????文件???????5817??2017-10-03?17:48??MqttCsharp\MqttCsharp\Form1.resx

?????文件???????3917??2017-10-03?16:10??MqttCsharp\MqttCsharp\MqttCsharp.csproj

?????文件????????863??2017-10-03?15:14??MqttCsharp\MqttCsharp\obj\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????7026??2017-10-03?16:08??MqttCsharp\MqttCsharp\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件????????811??2017-10-03?17:53??MqttCsharp\MqttCsharp\obj\Debug\MqttCsharp.csproj.FileListAbsolute.txt

?????文件????????975??2017-10-03?17:48??MqttCsharp\MqttCsharp\obj\Debug\MqttCsharp.csproj.GenerateResource.Cache

?????文件???????6687??2017-10-03?16:10??MqttCsharp\MqttCsharp\obj\Debug\MqttCsharp.csprojResolveAssemblyReference.cache

?????文件??????17408??2017-10-03?17:52??MqttCsharp\MqttCsharp\obj\Debug\MqttCsharp.exe

?????文件????????180??2017-10-03?17:48??MqttCsharp\MqttCsharp\obj\Debug\MqttCsharp.Form1.resources

?????文件??????30208??2017-10-03?17:52??MqttCsharp\MqttCsharp\obj\Debug\MqttCsharp.pdb

?????文件????????180??2017-10-03?16:10??MqttCsharp\MqttCsharp\obj\Debug\MqttCsharp.Properties.Resources.resources

?????文件??????????0??2017-10-03?15:14??MqttCsharp\MqttCsharp\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

?????文件??????????0??2017-10-03?15:14??MqttCsharp\MqttCsharp\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

?????文件??????????0??2017-10-03?15:14??MqttCsharp\MqttCsharp\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

?????文件????????522??2017-10-03?15:13??MqttCsharp\MqttCsharp\Program.cs

?????文件???????1340??2017-10-03?15:13??MqttCsharp\MqttCsharp\Properties\AssemblyInfo.cs

?????文件???????2872??2017-10-03?15:13??MqttCsharp\MqttCsharp\Properties\Resources.Designer.cs

?????文件???????5612??2017-10-03?15:13??MqttCsharp\MqttCsharp\Properties\Resources.resx

?????文件???????1097??2017-10-03?15:13??MqttCsharp\MqttCsharp\Properties\Settings.Designer.cs

?????文件????????249??2017-10-03?15:13??MqttCsharp\MqttCsharp\Properties\Settings.settings

............此處省略13個文件信息

評論

共有 條評論