服务器新增推送网络,移除开发中心功能。

This commit is contained in:
dathlin
2018-05-08 11:15:45 +08:00
parent c5ba15a95b
commit 326b715a13
8 changed files with 295 additions and 313 deletions

View File

@@ -61,8 +61,8 @@
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label_GC_Memery = new System.Windows.Forms.Label();
this.label_Pm_Memery = new System.Windows.Forms.Label();
this.label_Count_Simplify = new System.Windows.Forms.Label();
this.label_Count_Push = new System.Windows.Forms.Label();
this.statusStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
@@ -313,30 +313,30 @@
this.label7.TabIndex = 15;
this.label7.Text = "Push:";
//
// label_GC_Memery
// label_Count_Simplify
//
this.label_GC_Memery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label_GC_Memery.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label_GC_Memery.Cursor = System.Windows.Forms.Cursors.Hand;
this.label_GC_Memery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label_GC_Memery.Location = new System.Drawing.Point(648, 37);
this.label_GC_Memery.Name = "label_GC_Memery";
this.label_GC_Memery.Size = new System.Drawing.Size(108, 24);
this.label_GC_Memery.TabIndex = 16;
this.label_GC_Memery.Text = "0";
this.label_GC_Memery.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.label_Count_Simplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label_Count_Simplify.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label_Count_Simplify.Cursor = System.Windows.Forms.Cursors.Hand;
this.label_Count_Simplify.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label_Count_Simplify.Location = new System.Drawing.Point(648, 37);
this.label_Count_Simplify.Name = "label_Count_Simplify";
this.label_Count_Simplify.Size = new System.Drawing.Size(108, 24);
this.label_Count_Simplify.TabIndex = 16;
this.label_Count_Simplify.Text = "0";
this.label_Count_Simplify.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label_Pm_Memery
// label_Count_Push
//
this.label_Pm_Memery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label_Pm_Memery.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label_Pm_Memery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label_Pm_Memery.Location = new System.Drawing.Point(648, 67);
this.label_Pm_Memery.Name = "label_Pm_Memery";
this.label_Pm_Memery.Size = new System.Drawing.Size(108, 24);
this.label_Pm_Memery.TabIndex = 17;
this.label_Pm_Memery.Text = "0";
this.label_Pm_Memery.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.label_Count_Push.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label_Count_Push.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label_Count_Push.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label_Count_Push.Location = new System.Drawing.Point(648, 67);
this.label_Count_Push.Name = "label_Count_Push";
this.label_Count_Push.Size = new System.Drawing.Size(108, 24);
this.label_Count_Push.TabIndex = 17;
this.label_Count_Push.Text = "0";
this.label_Count_Push.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// FormServerWindow
//
@@ -344,8 +344,8 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.AliceBlue;
this.ClientSize = new System.Drawing.Size(764, 481);
this.Controls.Add(this.label_Pm_Memery);
this.Controls.Add(this.label_GC_Memery);
this.Controls.Add(this.label_Count_Push);
this.Controls.Add(this.label_Count_Simplify);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
@@ -404,8 +404,8 @@
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label_GC_Memery;
private System.Windows.Forms.Label label_Pm_Memery;
private System.Windows.Forms.Label label_Count_Simplify;
private System.Windows.Forms.Label label_Count_Push;
}
}

View File

@@ -229,6 +229,7 @@ namespace 软件系统服务端模版
Ultimate_File_Initiaization(); // 共享文件引擎初始化
Net_File_Portrait_Initialization(); // 头像文件管理服务
Net_Udp_Server_Initialization(); // UDP引擎服务初始化
Net_Push_Server_Initialization( ); // 推送网络引擎初始化
ToolStripMenuItem.Text = "已启动";
ToolStripMenuItem.BackColor = Color.LimeGreen;
IsSystemStart = true;
@@ -1075,6 +1076,28 @@ namespace 软件系统服务端模版
#endregion
#region Push Net [ ]
private NetPushServer pushServer;
private void Net_Push_Server_Initialization( )
{
try
{
pushServer = new NetPushServer( );
pushServer.Token = UserSystem.KeyToken;
pushServer.LogNet = RuntimeLogHelper;
pushServer.ServerStart( UserSystem.Port_Push_Server );
}
catch(Exception ex)
{
SoftBasic.ShowExceptionMessage( ex );
}
}
#endregion
#region Time Tick Thread
/*********************************************************************************************
@@ -1092,7 +1115,7 @@ namespace 软件系统服务端模版
{
toolStripStatusLabel_time.Alignment = ToolStripItemAlignment.Right;
statusStrip1.LayoutStyle = ToolStripLayoutStyle.StackWithOverflow;
toolStripStatusLabel_time.ForeColor = Color.Purple;//紫色
toolStripStatusLabel_time.ForeColor = Color.Purple; // 紫色
Thread thread = new Thread(new ThreadStart(ThreadTimeTick));
@@ -1106,12 +1129,14 @@ namespace 软件系统服务端模版
{
toolStripStatusLabel_time.Text = DateTime.Now.ToString( );
RenderOnlineAccount( );
if (net_simplify_server != null) label_Count_Simplify.Text = net_simplify_server.ClientCount.ToString( );
if (pushServer != null) label_Count_Push.Text = pushServer.OnlineCount.ToString( );
}
public void ThreadTimeTick()
{
Thread.Sleep(300);//加一个微小的延时
Thread.Sleep(300); // 加一个微小的延时
int second = DateTime.Now.Second - 1;
int minute = -1;
int hour = -1;