diff --git a/.gitattributes b/.gitattributes index bdb0cab..1ff0c42 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,17 +1,63 @@ -# Auto detect text files and perform LF normalization +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### * text=auto -# Custom for Visual Studio -*.cs diff=csharp +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index cd2946a..3a2238d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,47 +1,245 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +[Xx]64/ +[Xx]86/ +[Bb]uild/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml + +# TODO: Un-comment the next line if you do not want to checkin +# your web deploy settings because they may include unencrypted +# passwords +#*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# LightSwitch generated files +GeneratedArtifacts/ +ModelManifest.xml + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ \ No newline at end of file diff --git a/ServerSuperIO.v11.suo b/ServerSuperIO.v11.suo index 20e3952..7cba557 100644 Binary files a/ServerSuperIO.v11.suo and b/ServerSuperIO.v11.suo differ diff --git a/ServerSuperIO/Common/SocketExtension.cs b/ServerSuperIO/Common/SocketExtension.cs index 80e52d7..5e95c12 100644 --- a/ServerSuperIO/Common/SocketExtension.cs +++ b/ServerSuperIO/Common/SocketExtension.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Net.Sockets; using System.Text; @@ -54,7 +55,7 @@ public static void SendData(this Socket client, byte[] data) /// The data. /// The offset. /// The length. - public static void SendData(this Socket client, byte[] data, int offset, int length) + public static int SendData(this Socket client, byte[] data, int offset, int length) { int sent = 0; int thisSent = 0; @@ -64,6 +65,28 @@ public static void SendData(this Socket client, byte[] data, int offset, int len thisSent = client.Send(data, offset + sent, length - sent, SocketFlags.None); sent += thisSent; } + return thisSent; + } + + /// + /// Sends the data. + /// + /// The client. + /// The data. + /// The offset. + /// The length. + /// + public static int SendDataTo(this Socket client, byte[] data, int offset, int length,EndPoint endPoint) + { + int sent = 0; + int thisSent = 0; + + while ((length - sent) > 0) + { + thisSent = client.SendTo(data, offset + sent, length - sent, SocketFlags.None,endPoint); + sent += thisSent; + } + return thisSent; } } } diff --git a/ServerSuperIO/Communicate/NET/DeliveryMode.cs b/ServerSuperIO/Communicate/NET/DeliveryMode.cs new file mode 100644 index 0000000..a65d7d6 --- /dev/null +++ b/ServerSuperIO/Communicate/NET/DeliveryMode.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ServerSuperIO.Common; + +namespace ServerSuperIO.Communicate.NET +{ /// + /// 分发数据模式 + /// + public enum DeliveryMode + { + [EnumDescription("设备IP分发数据")] + DeviceIP, + [EnumDescription("设备地址分发数据")] + DeviceAddress + } +} diff --git a/ServerSuperIO/Communicate/NET/Handler.cs b/ServerSuperIO/Communicate/NET/Handler.cs index e84879e..b446823 100644 --- a/ServerSuperIO/Communicate/NET/Handler.cs +++ b/ServerSuperIO/Communicate/NET/Handler.cs @@ -11,7 +11,7 @@ namespace ServerSuperIO.Communicate.NET /// /// /// - internal delegate void ErrorHandler(object source, Exception e); + public delegate void ErrorHandler(object source, Exception e); /// /// 接收客户端事件 @@ -19,7 +19,7 @@ namespace ServerSuperIO.Communicate.NET /// /// /// - internal delegate void NewClientAcceptHandler(object source, Socket client, object state); + public delegate void NewClientAcceptHandler(object source, Socket client, object state); /// /// 关闭Socket事件 diff --git a/ServerSuperIO/Communicate/NET/ISocketListener.cs b/ServerSuperIO/Communicate/NET/ISocketListener.cs index 57d63cd..cf51a5b 100644 --- a/ServerSuperIO/Communicate/NET/ISocketListener.cs +++ b/ServerSuperIO/Communicate/NET/ISocketListener.cs @@ -4,16 +4,17 @@ using System.Net; using System.Net.Sockets; using System.Text; +using ServerSuperIO.Config; namespace ServerSuperIO.Communicate.NET { - internal interface ISocketListener + public interface ISocketListener { IPEndPoint EndPoint { get; } ListenerInfo ListenerInfo { get; } - bool Start(); + bool Start(IConfig config); void Stop(); diff --git a/ServerSuperIO/Communicate/NET/ISocketSession.cs b/ServerSuperIO/Communicate/NET/ISocketSession.cs index db18cac..2eb6370 100644 --- a/ServerSuperIO/Communicate/NET/ISocketSession.cs +++ b/ServerSuperIO/Communicate/NET/ISocketSession.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Net.Sockets; +using System.Security.Cryptography.X509Certificates; using System.Text; namespace ServerSuperIO.Communicate.NET @@ -25,8 +27,13 @@ public interface ISocketSession:IChannel Socket Client { get; } /// - /// 异步代理 + /// 远程点 /// + IPEndPoint RemoteEndPoint { get; } + + ///// + ///// 异步代理 + ///// ISocketAsyncEventArgsProxy SocketAsyncProxy { get; } /// diff --git a/ServerSuperIO/Communicate/NET/SocketController.cs b/ServerSuperIO/Communicate/NET/SocketController.cs index f70874b..b3f0dea 100644 --- a/ServerSuperIO/Communicate/NET/SocketController.cs +++ b/ServerSuperIO/Communicate/NET/SocketController.cs @@ -109,7 +109,8 @@ public void Send(IRunDevice dev, byte[] data) /// public void Receive(ISocketSession socketSession, byte[] data) { - if (this.Server.Config.ControlMode == ControlMode.Self + if (this.Server.Config.ControlMode == ControlMode.Loop + || this.Server.Config.ControlMode == ControlMode.Self || this.Server.Config.ControlMode == ControlMode.Parallel) { #region @@ -118,22 +119,50 @@ public void Receive(ISocketSession socketSession, byte[] data) if (list == null || list.Length <= 0) return; + int counter = 0; + bool isDelivery = false; foreach (IRunDevice dev in list) { - if (String.CompareOrdinal(dev.DeviceParameter.NET.RemoteIP, socketSession.RemoteIP) == 0) + + if (this.Server.Config.DeliveryMode == DeliveryMode.DeviceIP) + { + isDelivery = String.CompareOrdinal(dev.DeviceParameter.NET.RemoteIP, socketSession.RemoteIP) == 0 ? true : false; + } + else if (this.Server.Config.DeliveryMode == DeliveryMode.DeviceAddress) + { + if (dev.Protocol != null + && dev.Protocol.CheckData(data) + && dev.Protocol.GetAddress(data) == dev.DeviceParameter.DeviceAddr) + { + isDelivery = true; + } + else + { + isDelivery = false; + } + } + + if (isDelivery) { dev.ShowMonitorData(data, "接收"); try { - dev.Run(socketSession.Key, null, data); + if (this.Server.Config.SocketMode == SocketMode.Tcp) + { + dev.Run(socketSession.Key, null, data); + } + else if (this.Server.Config.SocketMode == SocketMode.Udp) + { + dev.Run(socketSession.Key, socketSession.Channel, data); + } } catch (Exception ex) { Server.Logger.Error(true, "", ex); } - int counter = this.Server.DeviceManager.GetCounter(dev.DeviceParameter.DeviceID); + counter = this.Server.DeviceManager.GetCounter(dev.DeviceParameter.DeviceID); Interlocked.Decrement(ref counter); @@ -143,6 +172,8 @@ public void Receive(ISocketSession socketSession, byte[] data) } this.Server.DeviceManager.SetCounter(dev.DeviceParameter.DeviceID, counter); + + break; } } #endregion diff --git a/ServerSuperIO/Communicate/NET/SocketListenerBase.cs b/ServerSuperIO/Communicate/NET/SocketListenerBase.cs index 82bb992..e646c89 100644 --- a/ServerSuperIO/Communicate/NET/SocketListenerBase.cs +++ b/ServerSuperIO/Communicate/NET/SocketListenerBase.cs @@ -4,10 +4,11 @@ using System.Net; using System.Net.Sockets; using System.Text; +using ServerSuperIO.Config; namespace ServerSuperIO.Communicate.NET { - internal abstract class SocketListenerBase:ISocketListener + public abstract class SocketListenerBase : ISocketListener { public IPEndPoint EndPoint { @@ -26,7 +27,7 @@ protected SocketListenerBase(ListenerInfo info) /// /// The server config. /// - public abstract bool Start(); + public abstract bool Start(IConfig config); public abstract void Stop(); diff --git a/ServerSuperIO/Communicate/NET/SocketMode.cs b/ServerSuperIO/Communicate/NET/SocketMode.cs new file mode 100644 index 0000000..15987e1 --- /dev/null +++ b/ServerSuperIO/Communicate/NET/SocketMode.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ServerSuperIO.Communicate.NET +{ + public enum SocketMode + { + Tcp, + Udp + } +} diff --git a/ServerSuperIO/Communicate/NET/SocketSession.cs b/ServerSuperIO/Communicate/NET/SocketSession.cs index 883e236..700eaf4 100644 --- a/ServerSuperIO/Communicate/NET/SocketSession.cs +++ b/ServerSuperIO/Communicate/NET/SocketSession.cs @@ -1,130 +1,129 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Net.Sockets; -using System.Runtime.InteropServices; -using System.Security.Policy; using System.Text; -using System.Threading; using ServerSuperIO.Common; using ServerSuperIO.Server; namespace ServerSuperIO.Communicate.NET { - public class SocketSession : ServerProvider, ISocketSession + public abstract class SocketSession : ServerProvider,ISocketSession { private bool _IsDisposed = false; + protected SocketSession(Socket socket, IPEndPoint remoteEndPoint, ISocketAsyncEventArgsProxy proxy) + { + SessionID = Guid.NewGuid().ToString(); - /// - /// 无数状态下记数器 - /// - private int _NoneDataCounter = 0; + string[] temp = remoteEndPoint.ToString().Split(':'); + if (temp.Length >= 2) + { + RemoteIP = temp[0]; + RemotePort = Convert.ToInt32(temp[1]); + } + RemoteEndPoint = remoteEndPoint; + Client = socket; + SocketAsyncProxy = proxy; + } + + ~SocketSession() + { + Dispose(false); + } /// /// 同步对象 /// private object _SyncLock = new object(); + /// - /// 设置多长时间后检测网络状态 + /// 远程IP /// - private byte[] _KeepAliveOptionValues; + public string RemoteIP { get; private set; } /// - /// 设置检测网络状态间隔时间 + /// 远程端口 /// - private byte[] _KeepAliveOptionOutValues; + public int RemotePort { get; private set; } /// - /// 构造函数 + /// Socket实例 /// - /// - /// - public SocketSession(Socket socket, ISocketAsyncEventArgsProxy proxy) - : base() - { - SessionID = Guid.NewGuid().ToString(); - string[] temp = socket.RemoteEndPoint.ToString().Split(':'); - if (temp.Length >= 2) - { - RemoteIP = temp[0]; - RemotePort = Convert.ToInt32(temp[1]); - } - Client = socket; + public Socket Client { get; private set; } - SocketAsyncProxy = proxy; - } + /// + /// 远程点 + /// + public IPEndPoint RemoteEndPoint { get; private set; } /// - /// 析构函数 + /// 代理实例 /// - ~SocketSession() - { - Dispose(false); - } + public ISocketAsyncEventArgsProxy SocketAsyncProxy { get; private set; } + + public event CloseSocketHandler CloseSocket; - public void Initialize() + protected virtual void OnCloseSocket() { - if (Client != null) + if (CloseSocket != null) { - //-------------------初始化心跳检测---------------------// - uint dummy = 0; - _KeepAliveOptionValues = new byte[Marshal.SizeOf(dummy) * 3]; - _KeepAliveOptionOutValues = new byte[_KeepAliveOptionValues.Length]; - BitConverter.GetBytes((uint)1).CopyTo(_KeepAliveOptionValues, 0); - BitConverter.GetBytes((uint)(2000)).CopyTo(_KeepAliveOptionValues, Marshal.SizeOf(dummy)); - - uint keepAlive = this.Server.Config.KeepAlive; + CloseSocket(this, this); + } + } - BitConverter.GetBytes((uint)(keepAlive)).CopyTo(_KeepAliveOptionValues, Marshal.SizeOf(dummy) * 2); + public event SocketReceiveDataHandler SocketReceiveData; - Client.IOControl(IOControlCode.KeepAliveValues, _KeepAliveOptionValues, _KeepAliveOptionOutValues); + protected virtual void OnSocketReceiveData(byte[] data) + { + if (SocketReceiveData != null) + { + SocketReceiveData(this, this, data); + } + } - Client.NoDelay = true; - Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true); - //----------------------------------------------------// + public abstract void TryReceive(); - Client.ReceiveTimeout = Server.Config.NetReceiveTimeout; - Client.SendTimeout = Server.Config.NetSendTimeout; - Client.ReceiveBufferSize = Server.Config.NetReceiveBufferSize; - Client.SendBufferSize = Server.Config.NetSendBufferSize; + public void TrySend(byte[] data, bool type) + { + if (type) + { + SendAsync(data); } - - if (SocketAsyncProxy != null) + else { - SocketAsyncProxy.Initialize(this); - SocketAsyncProxy.SocketReceiveEventArgs.Completed += SocketEventArgs_Completed; - SocketAsyncProxy.SocketSendEventArgs.Completed += SocketEventArgs_Completed; + SendSync(data); } } /// - /// 远程IP + /// 异步发送 /// - public string RemoteIP { get; private set; } - + /// + protected abstract void SendAsync(byte[] data); /// - /// 远程端口 + /// 同步发送 /// - public int RemotePort { get; private set; } - + /// + protected abstract void SendSync(byte[] data); /// - /// Socket实例 + /// 初始化 /// - public Socket Client { get; private set; } + public abstract void Initialize(); /// - /// 代理实例 + /// 事件完成接口 /// - public ISocketAsyncEventArgsProxy SocketAsyncProxy { get; private set; } + /// + /// + protected abstract void SocketEventArgs_Completed(object sender, SocketAsyncEventArgs e); - /// - /// 同步锁 - /// public object SyncLock { get { return _SyncLock; } } + /// /// 关键字 /// @@ -146,147 +145,20 @@ public IChannel Channel get { return (IChannel)this; } } - /// - /// 读操作 - /// - /// - public byte[] Read() - { - if (!this.IsDisposed) - { - System.Threading.Thread.Sleep(Server.Config.NetLoopInterval); - if (this.Client.Connected) - { - if (this.Client.Poll(10, SelectMode.SelectRead)) - { - try - { - byte[] buffer = SocketAsyncProxy.SocketReceiveEventArgs.Buffer; - - #region - - int num = this.Client.Receive(buffer, SocketAsyncProxy.ReceiveOffset, Client.ReceiveBufferSize, SocketFlags.None); - - if (num <= 0) - { - throw new SocketException((int) SocketError.HostDown); - } - else - { - this._NoneDataCounter = 0; - byte[] data = new byte[num]; - Buffer.BlockCopy(buffer, SocketAsyncProxy.ReceiveOffset, data, 0, data.Length); - return data; - } - - #endregion - } - catch (SocketException) - { - OnCloseSocket(); - throw; - } - } - else - { - this._NoneDataCounter++; - if (this._NoneDataCounter >= 60) - { - this._NoneDataCounter = 0; - OnCloseSocket(); - throw new SocketException((int)SocketError.HostDown); - } - else - { - return new byte[] { }; - } - } - } - else - { - OnCloseSocket(); - throw new SocketException((int)SocketError.HostDown); - } - } - else - { - return new byte[] { }; - } - } + public abstract byte[] Read(); - /// - /// 写操作 - /// - /// - /// - public int Write(byte[] data) - { - if (!this.IsDisposed) - { - if (this.Client.Connected - && - this.Client.Poll(10, SelectMode.SelectWrite)) - { - try - { - int successNum = 0; - int num = 0; - while (num < data.Length) - { - int remainLength = data.Length - num; - int sendLength = remainLength >= this.Client.SendBufferSize? this.Client.SendBufferSize : remainLength; - - SocketError error; - successNum += this.Client.Send(data, num, sendLength, SocketFlags.None, out error); + public abstract int Write(byte[] data); - num += sendLength; - - if (successNum <= 0 || error != SocketError.Success) - { - OnCloseSocket(); - throw new SocketException((int) SocketError.HostDown); - } - } - - return successNum; - } - catch (SocketException) - { - OnCloseSocket(); - throw; - } - } - else - { - OnCloseSocket(); - throw new SocketException((int)SocketError.HostDown); - } - } - else - { - return 0; - } - } - - /// - /// 关闭 - /// public void Close() { Dispose(true); } - /// - /// 通迅类型 - /// public CommunicateType CommunicationType { get { return CommunicateType.NET; } } - /// - /// 是否释放资源 - /// public bool IsDisposed { get { return _IsDisposed; } @@ -295,13 +167,13 @@ public bool IsDisposed /// /// 释放资源 /// - public void Dispose() + public virtual void Dispose() { Dispose(true); GC.SuppressFinalize(this); } - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (!this._IsDisposed) { @@ -317,190 +189,5 @@ private void Dispose(bool disposing) _IsDisposed = true; } } - - public event CloseSocketHandler CloseSocket; - - private void OnCloseSocket() - { - if (CloseSocket != null) - { - CloseSocket(this, this); - } - } - - public event SocketReceiveDataHandler SocketReceiveData; - - private void OnSocketReceiveData(byte[] data) - { - if (SocketReceiveData != null) - { - SocketReceiveData(this, this, data); - } - } - - public void TryReceive() - { - if (Client != null) - { - try - { - bool willRaiseEvent = this.Client.ReceiveAsync(this.SocketAsyncProxy.SocketReceiveEventArgs); - if (!willRaiseEvent) - { - ProcessReceive(this.SocketAsyncProxy.SocketReceiveEventArgs); - } - } - catch (Exception ex) - { - this.Server.Logger.Error(true, ex.Message); - } - } - } - - private void ProcessReceive(SocketAsyncEventArgs e) - { - ISocketSession socketSession = (ISocketSession)e.UserToken; - if (socketSession != null && socketSession.Client!=null) - { - try - { - if (e.BytesTransferred > 0 && e.SocketError == SocketError.Success) - { - byte[] data = new byte[e.BytesTransferred]; - Buffer.BlockCopy(e.Buffer, e.Offset, data, 0, e.BytesTransferred); - - bool willRaiseEvent = - socketSession.Client.ReceiveAsync(this.SocketAsyncProxy.SocketReceiveEventArgs); - if (!willRaiseEvent) - { - ProcessReceive(this.SocketAsyncProxy.SocketReceiveEventArgs); - } - - OnSocketReceiveData(data); - } - else - { - OnCloseSocket(); - } - } - catch (SocketException ex) - { - OnCloseSocket(); - this.Server.Logger.Error(true, ex.Message); - } - catch (Exception ex) - { - this.Server.Logger.Error(true, ex.Message); - } - } - } - - private void ProcessSend(SocketAsyncEventArgs e) - { - try - { - if (e.SocketError == SocketError.Success) - { - byte[] data = (byte[])e.UserToken; - - if (e.BytesTransferred < data.Length) - { - e.SetBuffer(data,e.BytesTransferred,data.Length-e.BytesTransferred); - bool willRaiseEvent = this.Client.SendAsync(e); - if (!willRaiseEvent) - { - ProcessSend(e); - } - } - else - { - e.UserToken = null; - } - } - else - { - OnCloseSocket(); - } - } - catch (SocketException ex) - { - OnCloseSocket(); - this.Server.Logger.Error(true, ex.Message); - } - catch (Exception ex) - { - this.Server.Logger.Error(true, ex.Message); - } - } - - public void TrySend(byte[] data, bool type) - { - if (type) - { - SendAsync(data); - } - else - { - SendSync(data); - } - } - - private void SendAsync(byte[] data) - { - if (Client != null) - { - try - { - this.SocketAsyncProxy.SocketSendEventArgs.UserToken = data; - this.SocketAsyncProxy.SocketSendEventArgs.SetBuffer(data, 0, data.Length); - bool willRaiseEvent = this.Client.SendAsync(this.SocketAsyncProxy.SocketSendEventArgs); - - if (!willRaiseEvent) - { - ProcessSend(this.SocketAsyncProxy.SocketSendEventArgs); - } - } - catch (Exception ex) - { - this.Server.Logger.Error(true,ex.Message); - } - } - } - - private void SendSync(byte[] data) - { - if (Client != null) - { - try - { - this.Client.SendData(data); - } - catch (SocketException ex) - { - OnCloseSocket(); - this.Server.Logger.Error(true, ex.Message); - } - catch (Exception ex) - { - this.Server.Logger.Error(true, ex.Message); - } - } - } - - private void SocketEventArgs_Completed(object sender, SocketAsyncEventArgs e) - { - switch (e.LastOperation) - { - case SocketAsyncOperation.Receive: - ProcessReceive(e); - break; - case SocketAsyncOperation.Send: - ProcessSend(e); - break; - default: - this.Server.Logger.Info(false, "不支持接收和发送的操作"); - break; - } - } } } diff --git a/ServerSuperIO/Communicate/NET/TcpSocketListener.cs b/ServerSuperIO/Communicate/NET/TcpSocketListener.cs index ba47013..26c7c2a 100644 --- a/ServerSuperIO/Communicate/NET/TcpSocketListener.cs +++ b/ServerSuperIO/Communicate/NET/TcpSocketListener.cs @@ -4,10 +4,11 @@ using System.Net.Sockets; using System.Text; using ServerSuperIO.Common; +using ServerSuperIO.Config; namespace ServerSuperIO.Communicate.NET { - internal class TcpSocketListener:SocketListenerBase + public class TcpSocketListener : SocketListenerBase { private int _ListenBackLog;//侦听队列数 @@ -20,7 +21,7 @@ public TcpSocketListener(ListenerInfo info) : base(info) _ListenBackLog = info.BackLog; } - public override bool Start() + public override bool Start(IConfig config) { _ListenSocket = new Socket(this.ListenerInfo.EndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); diff --git a/ServerSuperIO/Communicate/NET/TcpSocketSession.cs b/ServerSuperIO/Communicate/NET/TcpSocketSession.cs new file mode 100644 index 0000000..4e160b5 --- /dev/null +++ b/ServerSuperIO/Communicate/NET/TcpSocketSession.cs @@ -0,0 +1,353 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Runtime.InteropServices; +using System.Security.Policy; +using System.Text; +using System.Threading; +using ServerSuperIO.Common; +using ServerSuperIO.Server; + +namespace ServerSuperIO.Communicate.NET +{ + public class TcpSocketSession : SocketSession + { + /// + /// 无数状态下记数器 + /// + private int _NoneDataCounter = 0; + + /// + /// 设置多长时间后检测网络状态 + /// + private byte[] _KeepAliveOptionValues; + + /// + /// 设置检测网络状态间隔时间 + /// + private byte[] _KeepAliveOptionOutValues; + + /// + /// 构造函数 + /// + /// + /// + /// + public TcpSocketSession(Socket socket, IPEndPoint remoteEndPoint,ISocketAsyncEventArgsProxy proxy) + : base(socket,remoteEndPoint,proxy) + { + } + + public override void Initialize() + { + if (Client != null) + { + //-------------------初始化心跳检测---------------------// + uint dummy = 0; + _KeepAliveOptionValues = new byte[Marshal.SizeOf(dummy) * 3]; + _KeepAliveOptionOutValues = new byte[_KeepAliveOptionValues.Length]; + BitConverter.GetBytes((uint)1).CopyTo(_KeepAliveOptionValues, 0); + BitConverter.GetBytes((uint)(2000)).CopyTo(_KeepAliveOptionValues, Marshal.SizeOf(dummy)); + + uint keepAlive = this.Server.Config.KeepAlive; + + BitConverter.GetBytes((uint)(keepAlive)).CopyTo(_KeepAliveOptionValues, Marshal.SizeOf(dummy) * 2); + + Client.IOControl(IOControlCode.KeepAliveValues, _KeepAliveOptionValues, _KeepAliveOptionOutValues); + + Client.NoDelay = true; + Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true); + //----------------------------------------------------// + + Client.ReceiveTimeout = Server.Config.NetReceiveTimeout; + Client.SendTimeout = Server.Config.NetSendTimeout; + Client.ReceiveBufferSize = Server.Config.NetReceiveBufferSize; + Client.SendBufferSize = Server.Config.NetSendBufferSize; + } + + if (SocketAsyncProxy != null) + { + SocketAsyncProxy.Initialize(this); + SocketAsyncProxy.SocketReceiveEventArgs.Completed += SocketEventArgs_Completed; + SocketAsyncProxy.SocketSendEventArgs.Completed += SocketEventArgs_Completed; + } + } + + /// + /// 读操作 + /// + /// + public override byte[] Read() + { + if (!this.IsDisposed) + { + System.Threading.Thread.Sleep(Server.Config.NetLoopInterval); + if (this.Client.Connected) + { + if (this.Client.Poll(10, SelectMode.SelectRead)) + { + try + { + byte[] buffer = SocketAsyncProxy.SocketReceiveEventArgs.Buffer; + + #region + + int num = this.Client.Receive(buffer, SocketAsyncProxy.ReceiveOffset, Client.ReceiveBufferSize, SocketFlags.None); + + if (num <= 0) + { + throw new SocketException((int) SocketError.HostDown); + } + else + { + this._NoneDataCounter = 0; + byte[] data = new byte[num]; + Buffer.BlockCopy(buffer, SocketAsyncProxy.ReceiveOffset, data, 0, data.Length); + return data; + } + + #endregion + } + catch (SocketException) + { + OnCloseSocket(); + throw; + } + } + else + { + this._NoneDataCounter++; + if (this._NoneDataCounter >= 60) + { + this._NoneDataCounter = 0; + OnCloseSocket(); + throw new SocketException((int)SocketError.HostDown); + } + else + { + return new byte[] { }; + } + } + } + else + { + OnCloseSocket(); + throw new SocketException((int)SocketError.HostDown); + } + } + else + { + return new byte[] { }; + } + } + + /// + /// 写操作 + /// + /// + /// + public override int Write(byte[] data) + { + if (!this.IsDisposed) + { + if (this.Client.Connected + && + this.Client.Poll(10, SelectMode.SelectWrite)) + { + try + { + int successNum = 0; + int num = 0; + while (num < data.Length) + { + int remainLength = data.Length - num; + int sendLength = remainLength >= this.Client.SendBufferSize? this.Client.SendBufferSize : remainLength; + + SocketError error; + successNum += this.Client.Send(data, num, sendLength, SocketFlags.None, out error); + + num += sendLength; + + if (successNum <= 0 || error != SocketError.Success) + { + OnCloseSocket(); + throw new SocketException((int) SocketError.HostDown); + } + } + + return successNum; + } + catch (SocketException) + { + OnCloseSocket(); + throw; + } + } + else + { + OnCloseSocket(); + throw new SocketException((int)SocketError.HostDown); + } + } + else + { + return 0; + } + } + + public override void TryReceive() + { + if (Client != null) + { + try + { + bool willRaiseEvent = this.Client.ReceiveAsync(this.SocketAsyncProxy.SocketReceiveEventArgs); + if (!willRaiseEvent) + { + ProcessReceive(this.SocketAsyncProxy.SocketReceiveEventArgs); + } + } + catch (Exception ex) + { + this.Server.Logger.Error(true, ex.Message); + } + } + } + + private void ProcessReceive(SocketAsyncEventArgs e) + { + ISocketSession socketSession = (ISocketSession)e.UserToken; + if (socketSession != null && socketSession.Client!=null) + { + try + { + if (e.BytesTransferred > 0 && e.SocketError == SocketError.Success) + { + byte[] data = new byte[e.BytesTransferred]; + Buffer.BlockCopy(e.Buffer, e.Offset, data, 0, e.BytesTransferred); + + bool willRaiseEvent = + socketSession.Client.ReceiveAsync(this.SocketAsyncProxy.SocketReceiveEventArgs); + if (!willRaiseEvent) + { + ProcessReceive(this.SocketAsyncProxy.SocketReceiveEventArgs); + } + + OnSocketReceiveData(data); + } + else + { + OnCloseSocket(); + } + } + catch (SocketException ex) + { + OnCloseSocket(); + this.Server.Logger.Error(true, ex.Message); + } + catch (Exception ex) + { + this.Server.Logger.Error(true, ex.Message); + } + } + } + + private void ProcessSend(SocketAsyncEventArgs e) + { + try + { + if (e.SocketError == SocketError.Success) + { + byte[] data = (byte[])e.UserToken; + + if (e.BytesTransferred < data.Length) + { + e.SetBuffer(data,e.BytesTransferred,data.Length-e.BytesTransferred); + bool willRaiseEvent = this.Client.SendAsync(e); + if (!willRaiseEvent) + { + ProcessSend(e); + } + } + else + { + e.UserToken = null; + } + } + else + { + OnCloseSocket(); + } + } + catch (SocketException ex) + { + OnCloseSocket(); + this.Server.Logger.Error(true, ex.Message); + } + catch (Exception ex) + { + this.Server.Logger.Error(true, ex.Message); + } + } + + protected override void SendAsync(byte[] data) + { + if (Client != null) + { + try + { + this.SocketAsyncProxy.SocketSendEventArgs.UserToken = data; + this.SocketAsyncProxy.SocketSendEventArgs.SetBuffer(data, 0, data.Length); + bool willRaiseEvent = this.Client.SendAsync(this.SocketAsyncProxy.SocketSendEventArgs); + + if (!willRaiseEvent) + { + ProcessSend(this.SocketAsyncProxy.SocketSendEventArgs); + } + } + catch (Exception ex) + { + this.Server.Logger.Error(true,ex.Message); + } + } + } + + protected override void SendSync(byte[] data) + { + if (Client != null) + { + try + { + this.Client.SendData(data); + } + catch (SocketException ex) + { + OnCloseSocket(); + this.Server.Logger.Error(true, ex.Message); + } + catch (Exception ex) + { + this.Server.Logger.Error(true, ex.Message); + } + } + } + + protected override void SocketEventArgs_Completed(object sender, SocketAsyncEventArgs e) + { + switch (e.LastOperation) + { + case SocketAsyncOperation.Receive: + ProcessReceive(e); + break; + case SocketAsyncOperation.Send: + ProcessSend(e); + break; + default: + this.Server.Logger.Info(false, "不支持接收和发送的操作"); + break; + } + } + } +} diff --git a/ServerSuperIO/Communicate/NET/UdpSocketListener.cs b/ServerSuperIO/Communicate/NET/UdpSocketListener.cs new file mode 100644 index 0000000..6a71b7f --- /dev/null +++ b/ServerSuperIO/Communicate/NET/UdpSocketListener.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using ServerSuperIO.Config; + +namespace ServerSuperIO.Communicate.NET +{ + public class UdpSocketListener : SocketListenerBase + { + private Socket _ListenSocket; + + private SocketAsyncEventArgs _AcceptSAE; + + public UdpSocketListener(ListenerInfo info) + : base(info) + { + + } + + public override bool Start(IConfig config) + { + try + { + _ListenSocket = new Socket(this.EndPoint.AddressFamily, SocketType.Dgram, ProtocolType.Udp); + _ListenSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); + _ListenSocket.Bind(this.EndPoint); + + _AcceptSAE = new SocketAsyncEventArgs(); + + _AcceptSAE.Completed += new EventHandler(eventArgs_Completed); + _AcceptSAE.RemoteEndPoint = new IPEndPoint(IPAddress.Any, 0); + + int receiveBufferSize = config.NetReceiveBufferSize <= 0 ? 2048 : config.NetReceiveBufferSize; + var buffer = new byte[receiveBufferSize]; + _AcceptSAE.SetBuffer(buffer, 0, buffer.Length); + + _ListenSocket.ReceiveFromAsync(_AcceptSAE); + + return true; + } + catch (Exception e) + { + OnError(e); + return false; + } + } + + void eventArgs_Completed(object sender, SocketAsyncEventArgs e) + { + if (e.SocketError != SocketError.Success) + { + var errorCode = (int)e.SocketError; + + //The listen socket was closed + if (errorCode == 995 || errorCode == 10004 || errorCode == 10038) + return; + + OnError(new SocketException(errorCode)); + } + + if (e.LastOperation == SocketAsyncOperation.ReceiveFrom) + { + try + { + byte[] revData=new byte[e.BytesTransferred]; + Buffer.BlockCopy(e.Buffer,e.Offset,revData,0,e.BytesTransferred); + + OnNewClientAcceptedAsync(_ListenSocket, new object[]{revData,e.RemoteEndPoint}); + } + catch (Exception exc) + { + OnError(exc); + } + + try + { + _ListenSocket.ReceiveFromAsync(e); + } + catch (Exception exc) + { + OnError(exc); + } + } + } + + public override void Stop() + { + if (_ListenSocket == null) + return; + + lock (this) + { + if (_ListenSocket == null) + return; + + _AcceptSAE.Completed -= new EventHandler(eventArgs_Completed); + _AcceptSAE.Dispose(); + _AcceptSAE = null; + + try + { + _ListenSocket.Shutdown(SocketShutdown.Both); + } + catch { } + + try + { + _ListenSocket.Close(); + } + catch { } + + _ListenSocket = null; + } + + OnStopped(); + } + } +} diff --git a/ServerSuperIO/Communicate/NET/UdpSocketSession.cs b/ServerSuperIO/Communicate/NET/UdpSocketSession.cs new file mode 100644 index 0000000..e63eaa2 --- /dev/null +++ b/ServerSuperIO/Communicate/NET/UdpSocketSession.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using ServerSuperIO.Common; +using ServerSuperIO.Server; + +namespace ServerSuperIO.Communicate.NET +{ + public class UdpSocketSession : SocketSession + { + public UdpSocketSession(Socket socket, IPEndPoint remoteEndPoint, ISocketAsyncEventArgsProxy proxy):base(socket,remoteEndPoint,proxy) + { + + } + + public override void TryReceive() + { + return; + } + + protected override void SendAsync(byte[] data) + { + SocketAsyncEventArgs e = new SocketAsyncEventArgs(); + + e.Completed += new EventHandler(SocketEventArgs_Completed); + e.RemoteEndPoint = RemoteEndPoint; + e.UserToken = data; + + e.SetBuffer(data,0, data.Length); + + if (Client != null) + { + if (!Client.SendToAsync(e)) + { + ProcessSend(e); + } + } + } + + private void ProcessSend(SocketAsyncEventArgs e) + { + try + { + if (e.SocketError == SocketError.Success) + { + byte[] data = (byte[])e.UserToken; + + if (e.BytesTransferred < data.Length) + { + e.SetBuffer(data, e.BytesTransferred, data.Length - e.BytesTransferred); + bool willRaiseEvent = this.Client.SendToAsync(e); + if (!willRaiseEvent) + { + ProcessSend(e); + } + } + else + { + CleanAsyncEventArgs(e); + } + } + else + { + CleanAsyncEventArgs(e); + OnCloseSocket(); + } + } + catch (SocketException ex) + { + CleanAsyncEventArgs(e); + OnCloseSocket(); + this.Server.Logger.Error(true, ex.Message); + } + catch (Exception ex) + { + this.Server.Logger.Error(true, ex.Message); + } + } + + protected override void SendSync(byte[] data) + { + this.Client.SendDataTo(data, 0, data.Length, this.RemoteEndPoint); + } + + public override void Initialize() + { + return; + } + + protected override void SocketEventArgs_Completed(object sender, SocketAsyncEventArgs e) + { + switch (e.LastOperation) + { + case SocketAsyncOperation.SendTo: + ProcessSend(e); + break; + default: + this.Server.Logger.Info(false, "不支持接收和发送的操作"); + break; + } + } + + void CleanAsyncEventArgs(SocketAsyncEventArgs e) + { + e.UserToken = null; + e.Completed -= new EventHandler(SocketEventArgs_Completed); + e.Dispose(); + } + + public override byte[] Read() + { + return new byte[]{}; + } + + public override int Write(byte[] data) + { + return this.Client.SendDataTo(data, 0,data.Length, this.RemoteEndPoint); + } + } +} diff --git a/ServerSuperIO/Config/Config.cs b/ServerSuperIO/Config/Config.cs index a00cba6..52c378e 100644 --- a/ServerSuperIO/Config/Config.cs +++ b/ServerSuperIO/Config/Config.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Text; using ServerSuperIO.Communicate; +using ServerSuperIO.Communicate.NET; namespace ServerSuperIO.Config { @@ -25,6 +26,8 @@ public Config() ListenPort = 6699; BackLog = 1000; IsCheckSameSocketSession = true; + SocketMode=SocketMode.Tcp; + DeliveryMode=DeliveryMode.DeviceIP; } public int ComReadBufferSize { get; set; } @@ -58,5 +61,9 @@ public Config() public int BackLog { get; set; } public bool IsCheckSameSocketSession { get; set; } + + public SocketMode SocketMode { get; set; } + + public DeliveryMode DeliveryMode { get; set; } } } diff --git a/ServerSuperIO/Config/IConfig.cs b/ServerSuperIO/Config/IConfig.cs index d8d036c..ebc1508 100644 --- a/ServerSuperIO/Config/IConfig.cs +++ b/ServerSuperIO/Config/IConfig.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Text; using ServerSuperIO.Communicate; +using ServerSuperIO.Communicate.NET; namespace ServerSuperIO.Config { @@ -88,5 +89,14 @@ public interface IConfig /// ControlMode ControlMode { get; set; } + /// + /// socket模式 + /// + SocketMode SocketMode { get; set; } + + /// + /// 分发模式 + /// + DeliveryMode DeliveryMode { get; set; } } } diff --git a/ServerSuperIO/Device/RunDevice.cs b/ServerSuperIO/Device/RunDevice.cs index 68e89cc..390daa3 100644 --- a/ServerSuperIO/Device/RunDevice.cs +++ b/ServerSuperIO/Device/RunDevice.cs @@ -107,7 +107,7 @@ public byte[] GetSendBytes() /// /// /// - public void Send(IChannel io, byte[] senddata) + public virtual void Send(IChannel io, byte[] senddata) { io.Write(senddata); } @@ -117,7 +117,7 @@ public void Send(IChannel io, byte[] senddata) /// /// /// - public byte[] Receive(IChannel io) + public virtual byte[] Receive(IChannel io) { return io.Read(); } @@ -503,7 +503,7 @@ public object SyncLock /// /// 协议驱动接口 /// - public IProtocolDriver Protocol { get; protected set; } + public abstract IProtocolDriver Protocol { get; } /// /// 设备类型 diff --git a/ServerSuperIO/Properties/AssemblyInfo.cs b/ServerSuperIO/Properties/AssemblyInfo.cs index ef494b0..ce82a2d 100644 --- a/ServerSuperIO/Properties/AssemblyInfo.cs +++ b/ServerSuperIO/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0")] -[assembly: AssemblyFileVersion("1.0")] +[assembly: AssemblyVersion("1.2")] +[assembly: AssemblyFileVersion("1.2")] diff --git a/ServerSuperIO/Server/Server.cs b/ServerSuperIO/Server/Server.cs index 183001c..904b24a 100644 --- a/ServerSuperIO/Server/Server.cs +++ b/ServerSuperIO/Server/Server.cs @@ -48,11 +48,20 @@ private void InitListener() EndPoint = new IPEndPoint(ipa, Config.ListenPort) }; - ISocketListener socketListener = new TcpSocketListener(info); + ISocketListener socketListener; + if (this.Config.SocketMode == SocketMode.Tcp) + { + socketListener = new TcpSocketListener(info); + } + else + { + socketListener = new UdpSocketListener(info); + } + socketListener.NewClientAccepted += tcpSocketListener_NewClientAccepted; socketListener.Error += tcpSocketListener_Error; socketListener.Stopped += tcpSocketListener_Stopped; - socketListener.Start(); + socketListener.Start(this.Config); _Listeners.Add(socketListener); } @@ -130,7 +139,6 @@ public override void Stop() _BufferManager = null; - base.Stop(); } @@ -146,22 +154,31 @@ private void tcpSocketListener_Error(object sender, Exception e) private void tcpSocketListener_NewClientAccepted(object sender, System.Net.Sockets.Socket client, object state) { - if (this.Config.ControlMode == ControlMode.Loop - || this.Config.ControlMode == ControlMode.Self - || this.Config.ControlMode == ControlMode.Parallel) + if (this.Config.SocketMode == SocketMode.Tcp) { - if (Config.IsCheckSameSocketSession) + if (this.Config.ControlMode == ControlMode.Loop + || this.Config.ControlMode == ControlMode.Self + || this.Config.ControlMode == ControlMode.Parallel) { - string[] ipInfo = client.RemoteEndPoint.ToString().Split(':'); - IChannel socketSession =ChannelManager.GetChannel(ipInfo[0],CommunicateType.NET); - if (socketSession!=null) + if (Config.IsCheckSameSocketSession) { - RemoveSocketSession((ISocketSession)socketSession); + string[] ipInfo = client.RemoteEndPoint.ToString().Split(':'); + IChannel socketSession = ChannelManager.GetChannel(ipInfo[0], CommunicateType.NET); + if (socketSession != null) + { + RemoveTcpSocketSession((ISocketSession) socketSession); + } } } - } - AddSocketSession(client); + AddTcpSocketSession(client); + } + else if (this.Config.SocketMode == SocketMode.Udp) + { + object[] arr = (object[])state; + ISocketSession socketSession=new UdpSocketSession(client,(IPEndPoint)arr[1],null); + socketChannel_SocketReceiveData(socketSession, socketSession, (byte[])arr[0]); + } } private void socketChannel_SocketReceiveData(object source, ISocketSession socketSession, byte[] data) @@ -169,7 +186,7 @@ private void socketChannel_SocketReceiveData(object source, ISocketSession socke ISocketController netController = (ISocketController)ControllerManager.GetController(SocketController.ConstantKey); if (netController != null) { - netController.Receive(socketSession,data); + netController.Receive(socketSession, data); } else { @@ -179,10 +196,10 @@ private void socketChannel_SocketReceiveData(object source, ISocketSession socke private void socketChannel_CloseSocket(object source, ISocketSession socketSession) { - RemoveSocketSession(socketSession); + RemoveTcpSocketSession(socketSession); } - private void AddSocketSession(Socket client) + private void AddTcpSocketSession(Socket client) { if (client == null) return; @@ -197,7 +214,7 @@ private void AddSocketSession(Socket client) return; } - ISocketSession socketSession = new SocketSession(client, socketProxy); + ISocketSession socketSession = new TcpSocketSession(client,(IPEndPoint)client.RemoteEndPoint, socketProxy); socketSession.Setup(this); socketSession.Initialize(); @@ -232,7 +249,7 @@ private void AddSocketSession(Socket client) } } - private void RemoveSocketSession(ISocketSession socketSession) + private void RemoveTcpSocketSession(ISocketSession socketSession) { if (socketSession == null) return; diff --git a/ServerSuperIO/ServerSuperIO.csproj b/ServerSuperIO/ServerSuperIO.csproj index 233fe3e..f12c78e 100644 --- a/ServerSuperIO/ServerSuperIO.csproj +++ b/ServerSuperIO/ServerSuperIO.csproj @@ -22,6 +22,7 @@ prompt 4 x86 + false pdbonly @@ -31,6 +32,7 @@ prompt 4 x86 + false @@ -78,6 +80,7 @@ + @@ -90,9 +93,15 @@ + + + + + Code + diff --git a/ServerSuperIO/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ServerSuperIO/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 8739320..e75c380 100644 Binary files a/ServerSuperIO/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/ServerSuperIO/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ServerSuperIO/obj/Debug/ServerSuperIO.csproj.FileListAbsolute.txt b/ServerSuperIO/obj/Debug/ServerSuperIO.csproj.FileListAbsolute.txt index a9a3bac..ef9a4fb 100644 --- a/ServerSuperIO/obj/Debug/ServerSuperIO.csproj.FileListAbsolute.txt +++ b/ServerSuperIO/obj/Debug/ServerSuperIO.csproj.FileListAbsolute.txt @@ -6,3 +6,4 @@ E:\工作目录\工作区\平台软件\ServerSuperIO\ServerSuperIO\obj\Debug\Ser E:\工作目录\工作区\平台软件\ServerSuperIO\ServerSuperIO\obj\Debug\ServerSuperIO.pdb E:\工作目录\工作区\平台软件\ServerSuperIO\bin\ServerSuperIO.dll E:\工作目录\工作区\平台软件\ServerSuperIO\bin\ServerSuperIO.pdb +E:\工作目录\工作区\平台软件\ServerSuperIO\ServerSuperIO\obj\Debug\ServerSuperIO.csprojResolveAssemblyReference.cache diff --git a/ServerSuperIO/obj/Debug/ServerSuperIO.csproj.GenerateResource.Cache b/ServerSuperIO/obj/Debug/ServerSuperIO.csproj.GenerateResource.Cache index cbc8969..f2d6bf6 100644 Binary files a/ServerSuperIO/obj/Debug/ServerSuperIO.csproj.GenerateResource.Cache and b/ServerSuperIO/obj/Debug/ServerSuperIO.csproj.GenerateResource.Cache differ diff --git a/ServerSuperIO/obj/Debug/ServerSuperIO.csprojResolveAssemblyReference.cache b/ServerSuperIO/obj/Debug/ServerSuperIO.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c35439b Binary files /dev/null and b/ServerSuperIO/obj/Debug/ServerSuperIO.csprojResolveAssemblyReference.cache differ diff --git a/ServerSuperIO/obj/Debug/ServerSuperIO.dll b/ServerSuperIO/obj/Debug/ServerSuperIO.dll index 124e4c1..dfd5e64 100644 Binary files a/ServerSuperIO/obj/Debug/ServerSuperIO.dll and b/ServerSuperIO/obj/Debug/ServerSuperIO.dll differ diff --git a/ServerSuperIO/obj/Debug/ServerSuperIO.pdb b/ServerSuperIO/obj/Debug/ServerSuperIO.pdb index 198fbe9..1902abd 100644 Binary files a/ServerSuperIO/obj/Debug/ServerSuperIO.pdb and b/ServerSuperIO/obj/Debug/ServerSuperIO.pdb differ diff --git a/ServerSuperIO/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/ServerSuperIO/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 167fec5..00adf10 100644 Binary files a/ServerSuperIO/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/ServerSuperIO/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ServerSuperIO/obj/Release/ServerSuperIO.csproj.FileListAbsolute.txt b/ServerSuperIO/obj/Release/ServerSuperIO.csproj.FileListAbsolute.txt index 1e64508..de4f81f 100644 --- a/ServerSuperIO/obj/Release/ServerSuperIO.csproj.FileListAbsolute.txt +++ b/ServerSuperIO/obj/Release/ServerSuperIO.csproj.FileListAbsolute.txt @@ -6,4 +6,3 @@ E:\工作目录\工作区\平台软件\ServerSuperIO\ServerSuperIO\obj\Release\S E:\工作目录\工作区\平台软件\ServerSuperIO\ServerSuperIO\obj\Release\ServerSuperIO.csproj.GenerateResource.Cache E:\工作目录\工作区\平台软件\ServerSuperIO\bin\ServerSuperIO.dll E:\工作目录\工作区\平台软件\ServerSuperIO\bin\ServerSuperIO.pdb -E:\工作目录\工作区\平台软件\ServerSuperIO\ServerSuperIO\obj\Release\ServerSuperIO.csprojResolveAssemblyReference.cache diff --git a/ServerSuperIO/obj/Release/ServerSuperIO.csproj.GenerateResource.Cache b/ServerSuperIO/obj/Release/ServerSuperIO.csproj.GenerateResource.Cache index cbc8969..f2d6bf6 100644 Binary files a/ServerSuperIO/obj/Release/ServerSuperIO.csproj.GenerateResource.Cache and b/ServerSuperIO/obj/Release/ServerSuperIO.csproj.GenerateResource.Cache differ diff --git a/ServerSuperIO/obj/Release/ServerSuperIO.dll b/ServerSuperIO/obj/Release/ServerSuperIO.dll index c49c678..6a1ffe1 100644 Binary files a/ServerSuperIO/obj/Release/ServerSuperIO.dll and b/ServerSuperIO/obj/Release/ServerSuperIO.dll differ diff --git a/ServerSuperIO/obj/Release/ServerSuperIO.pdb b/ServerSuperIO/obj/Release/ServerSuperIO.pdb index 31bb0b0..ac6869d 100644 Binary files a/ServerSuperIO/obj/Release/ServerSuperIO.pdb and b/ServerSuperIO/obj/Release/ServerSuperIO.pdb differ diff --git a/TestDeviceDriver/DeviceDriver.cs b/TestDeviceDriver/DeviceDriver.cs index df16fc9..7b2c7cd 100644 --- a/TestDeviceDriver/DeviceDriver.cs +++ b/TestDeviceDriver/DeviceDriver.cs @@ -13,15 +13,16 @@ public class DeviceDriver:RunDevice { private DeviceDyn _deviceDyn; private DevicePara _devicePara; + private DeviceProtocol _protocol; public DeviceDriver() : base() { _devicePara = new DevicePara(); _deviceDyn = new DeviceDyn(); + _protocol = new DeviceProtocol(); } public override void Initialize(int devid) { - this.Protocol=new DeviceProtocol(); this.Protocol.InitDriver(this); //初始化设备参数信息 @@ -76,6 +77,8 @@ public override void CommunicateInterrupt(ServerSuperIO.Communicate.IRequestInfo public override void CommunicateError(ServerSuperIO.Communicate.IRequestInfo info) { + //UDP + //info.Channel.Write(System.Text.Encoding.ASCII.GetBytes("aaa")); OnDeviceRuningLog("通讯干扰"); } @@ -155,6 +158,8 @@ public override IDeviceParameter DeviceParameter get { return _devicePara; } } + public override IProtocolDriver Protocol { get; } + public override DeviceType DeviceType { get { return DeviceType.Common; } diff --git a/TestDeviceDriver/DeviceSingletonDriver.cs b/TestDeviceDriver/DeviceSingletonDriver.cs index a306980..8e71362 100644 --- a/TestDeviceDriver/DeviceSingletonDriver.cs +++ b/TestDeviceDriver/DeviceSingletonDriver.cs @@ -14,16 +14,17 @@ public class DeviceSingletonDriver:RunDevice { private DeviceDyn _deviceDyn; private DevicePara _devicePara; + private DeviceProtocol _protocol; public DeviceSingletonDriver() : base() { _devicePara = new DevicePara(); _deviceDyn = new DeviceDyn(); + _protocol=new DeviceProtocol(); } public override void Initialize(int devid) { - this.Protocol=new DeviceProtocol(); this.Protocol.InitDriver(this); //初始化设备参数信息 @@ -159,6 +160,8 @@ public override IDeviceParameter DeviceParameter get { return _devicePara; } } + public override IProtocolDriver Protocol { get; } + public override DeviceType DeviceType { get { return DeviceType.Common; } diff --git a/TestDeviceDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestDeviceDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 2f21df9..cf1db16 100644 Binary files a/TestDeviceDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestDeviceDriver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestDeviceDriver/obj/Debug/TestDeviceDriver.csprojResolveAssemblyReference.cache b/TestDeviceDriver/obj/Debug/TestDeviceDriver.csprojResolveAssemblyReference.cache index 6a0cb0b..8883f21 100644 Binary files a/TestDeviceDriver/obj/Debug/TestDeviceDriver.csprojResolveAssemblyReference.cache and b/TestDeviceDriver/obj/Debug/TestDeviceDriver.csprojResolveAssemblyReference.cache differ diff --git a/TestDeviceDriver/obj/Debug/TestDeviceDriver.dll b/TestDeviceDriver/obj/Debug/TestDeviceDriver.dll index b15c07d..e43f86c 100644 Binary files a/TestDeviceDriver/obj/Debug/TestDeviceDriver.dll and b/TestDeviceDriver/obj/Debug/TestDeviceDriver.dll differ diff --git a/TestDeviceDriver/obj/Debug/TestDeviceDriver.pdb b/TestDeviceDriver/obj/Debug/TestDeviceDriver.pdb index 79b1dcf..00caaf3 100644 Binary files a/TestDeviceDriver/obj/Debug/TestDeviceDriver.pdb and b/TestDeviceDriver/obj/Debug/TestDeviceDriver.pdb differ diff --git a/TestDeviceDriver/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestDeviceDriver/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index a3f5540..03c1a8d 100644 Binary files a/TestDeviceDriver/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestDeviceDriver/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestDeviceDriver/obj/Release/TestDeviceDriver.csprojResolveAssemblyReference.cache b/TestDeviceDriver/obj/Release/TestDeviceDriver.csprojResolveAssemblyReference.cache index c2576a8..6deacbe 100644 Binary files a/TestDeviceDriver/obj/Release/TestDeviceDriver.csprojResolveAssemblyReference.cache and b/TestDeviceDriver/obj/Release/TestDeviceDriver.csprojResolveAssemblyReference.cache differ diff --git a/TestDeviceDriver/obj/Release/TestDeviceDriver.dll b/TestDeviceDriver/obj/Release/TestDeviceDriver.dll index 2a53aa3..cc62415 100644 Binary files a/TestDeviceDriver/obj/Release/TestDeviceDriver.dll and b/TestDeviceDriver/obj/Release/TestDeviceDriver.dll differ diff --git a/TestDeviceDriver/obj/Release/TestDeviceDriver.pdb b/TestDeviceDriver/obj/Release/TestDeviceDriver.pdb index 6d63f81..4036ced 100644 Binary files a/TestDeviceDriver/obj/Release/TestDeviceDriver.pdb and b/TestDeviceDriver/obj/Release/TestDeviceDriver.pdb differ diff --git a/TestHareware/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestHareware/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 4b16e82..ebf4caa 100644 Binary files a/TestHareware/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestHareware/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestHareware/obj/Debug/TestHareware.csproj.FileListAbsolute.txt b/TestHareware/obj/Debug/TestHareware.csproj.FileListAbsolute.txt index 6107db6..1070ab8 100644 --- a/TestHareware/obj/Debug/TestHareware.csproj.FileListAbsolute.txt +++ b/TestHareware/obj/Debug/TestHareware.csproj.FileListAbsolute.txt @@ -6,4 +6,3 @@ E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Debug\Test E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Debug\TestHareware.csproj.GenerateResource.Cache E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Debug\TestHareware.exe E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Debug\TestHareware.pdb -E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Debug\TestHareware.csprojResolveAssemblyReference.cache diff --git a/TestHareware/obj/Debug/TestHareware.csproj.GenerateResource.Cache b/TestHareware/obj/Debug/TestHareware.csproj.GenerateResource.Cache index c586c31..c318c83 100644 Binary files a/TestHareware/obj/Debug/TestHareware.csproj.GenerateResource.Cache and b/TestHareware/obj/Debug/TestHareware.csproj.GenerateResource.Cache differ diff --git a/TestHareware/obj/Debug/TestHareware.exe b/TestHareware/obj/Debug/TestHareware.exe index fc5898c..f685ed9 100644 Binary files a/TestHareware/obj/Debug/TestHareware.exe and b/TestHareware/obj/Debug/TestHareware.exe differ diff --git a/TestHareware/obj/Debug/TestHareware.pdb b/TestHareware/obj/Debug/TestHareware.pdb index 2602e37..fbb51d3 100644 Binary files a/TestHareware/obj/Debug/TestHareware.pdb and b/TestHareware/obj/Debug/TestHareware.pdb differ diff --git a/TestHareware/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestHareware/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 43bd462..1a35bf5 100644 Binary files a/TestHareware/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestHareware/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestHareware/obj/Release/TestDevice.TestHarewareForm.resources b/TestHareware/obj/Release/TestDevice.TestHarewareForm.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/TestHareware/obj/Release/TestDevice.TestHarewareForm.resources differ diff --git a/TestHareware/obj/Release/TestHareware.Properties.Resources.resources b/TestHareware/obj/Release/TestHareware.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/TestHareware/obj/Release/TestHareware.Properties.Resources.resources differ diff --git a/TestHareware/obj/Release/TestHareware.csproj.FileListAbsolute.txt b/TestHareware/obj/Release/TestHareware.csproj.FileListAbsolute.txt index 393ade0..883d1fd 100644 --- a/TestHareware/obj/Release/TestHareware.csproj.FileListAbsolute.txt +++ b/TestHareware/obj/Release/TestHareware.csproj.FileListAbsolute.txt @@ -1 +1,9 @@ E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestHareware.exe.config +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestHareware.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestHareware.pdb +E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Release\TestHareware.csprojResolveAssemblyReference.cache +E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Release\TestHareware.Properties.Resources.resources +E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Release\TestDevice.TestHarewareForm.resources +E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Release\TestHareware.csproj.GenerateResource.Cache +E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Release\TestHareware.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\TestHareware\obj\Release\TestHareware.pdb diff --git a/TestHareware/obj/Release/TestHareware.csproj.GenerateResource.Cache b/TestHareware/obj/Release/TestHareware.csproj.GenerateResource.Cache new file mode 100644 index 0000000..c318c83 Binary files /dev/null and b/TestHareware/obj/Release/TestHareware.csproj.GenerateResource.Cache differ diff --git a/TestHareware/obj/Release/TestHareware.csprojResolveAssemblyReference.cache b/TestHareware/obj/Release/TestHareware.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..a546864 Binary files /dev/null and b/TestHareware/obj/Release/TestHareware.csprojResolveAssemblyReference.cache differ diff --git a/TestHareware/obj/Release/TestHareware.exe b/TestHareware/obj/Release/TestHareware.exe new file mode 100644 index 0000000..e1d11dd Binary files /dev/null and b/TestHareware/obj/Release/TestHareware.exe differ diff --git a/TestHareware/obj/Release/TestHareware.pdb b/TestHareware/obj/Release/TestHareware.pdb new file mode 100644 index 0000000..61db548 Binary files /dev/null and b/TestHareware/obj/Release/TestHareware.pdb differ diff --git a/TestLog/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestLog/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index c79e37a..7a73ee8 100644 Binary files a/TestLog/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestLog/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestLog/obj/Debug/TestLog.csprojResolveAssemblyReference.cache b/TestLog/obj/Debug/TestLog.csprojResolveAssemblyReference.cache index cfeceb6..8883f21 100644 Binary files a/TestLog/obj/Debug/TestLog.csprojResolveAssemblyReference.cache and b/TestLog/obj/Debug/TestLog.csprojResolveAssemblyReference.cache differ diff --git a/TestLog/obj/Debug/TestLog.exe b/TestLog/obj/Debug/TestLog.exe index 0caf12b..95ad2cc 100644 Binary files a/TestLog/obj/Debug/TestLog.exe and b/TestLog/obj/Debug/TestLog.exe differ diff --git a/TestLog/obj/Debug/TestLog.pdb b/TestLog/obj/Debug/TestLog.pdb index e525bb7..0255122 100644 Binary files a/TestLog/obj/Debug/TestLog.pdb and b/TestLog/obj/Debug/TestLog.pdb differ diff --git a/TestLog/obj/Debug/build.force b/TestLog/obj/Debug/build.force new file mode 100644 index 0000000..e69de29 diff --git a/TestLog/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestLog/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 3172f6a..08a4f70 100644 Binary files a/TestLog/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestLog/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestLog/obj/Release/TestLog.csproj.FileListAbsolute.txt b/TestLog/obj/Release/TestLog.csproj.FileListAbsolute.txt index 2b7afbb..b29c3bc 100644 --- a/TestLog/obj/Release/TestLog.csproj.FileListAbsolute.txt +++ b/TestLog/obj/Release/TestLog.csproj.FileListAbsolute.txt @@ -1 +1,7 @@ E:\工作目录\工作区\平台软件\ServerSuperIO\TestLog\bin\Release\TestLog.exe.config +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestLog.exe.config +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestLog.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestLog.pdb +E:\工作目录\工作区\平台软件\ServerSuperIO\TestLog\obj\Release\TestLog.csprojResolveAssemblyReference.cache +E:\工作目录\工作区\平台软件\ServerSuperIO\TestLog\obj\Release\TestLog.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\TestLog\obj\Release\TestLog.pdb diff --git a/TestLog/obj/Release/TestLog.csprojResolveAssemblyReference.cache b/TestLog/obj/Release/TestLog.csprojResolveAssemblyReference.cache index 990d5bb..6deacbe 100644 Binary files a/TestLog/obj/Release/TestLog.csprojResolveAssemblyReference.cache and b/TestLog/obj/Release/TestLog.csprojResolveAssemblyReference.cache differ diff --git a/TestLog/obj/Release/TestLog.exe b/TestLog/obj/Release/TestLog.exe new file mode 100644 index 0000000..7c947f2 Binary files /dev/null and b/TestLog/obj/Release/TestLog.exe differ diff --git a/TestLog/obj/Release/TestLog.pdb b/TestLog/obj/Release/TestLog.pdb new file mode 100644 index 0000000..607a03f Binary files /dev/null and b/TestLog/obj/Release/TestLog.pdb differ diff --git a/TestLoopMain/Program.cs b/TestLoopMain/Program.cs index 1d41ddc..e291158 100644 --- a/TestLoopMain/Program.cs +++ b/TestLoopMain/Program.cs @@ -4,6 +4,7 @@ using System.Text; using System.Threading.Tasks; using ServerSuperIO.Communicate; +using ServerSuperIO.Communicate.NET; using ServerSuperIO.Config; using ServerSuperIO.Device; using ServerSuperIO.Server; @@ -61,6 +62,7 @@ static void Main(string[] args) Server server=new Server("服务1",new Config() { + SocketMode = SocketMode.Udp, ControlMode = ControlMode.Loop }); @@ -79,7 +81,7 @@ static void Main(string[] args) //dev3.DeviceParameter.NET.WorkMode=WorkMode.TcpClient; - dev1.ShowMonitorDialog(); + //dev1.ShowMonitorDialog(); ////个性串口号 //int oldport = dev1.DeviceParameter.COM.Port; diff --git a/TestLoopMain/TestLoopMain.csproj.user b/TestLoopMain/TestLoopMain.csproj.user new file mode 100644 index 0000000..55f44b9 --- /dev/null +++ b/TestLoopMain/TestLoopMain.csproj.user @@ -0,0 +1,6 @@ + + + + ShowAllFiles + + \ No newline at end of file diff --git a/TestLoopMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestLoopMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index e927037..85f8908 100644 Binary files a/TestLoopMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestLoopMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestLoopMain/obj/Debug/TestLoopMain.csprojResolveAssemblyReference.cache b/TestLoopMain/obj/Debug/TestLoopMain.csprojResolveAssemblyReference.cache index 6be24ba..3773065 100644 Binary files a/TestLoopMain/obj/Debug/TestLoopMain.csprojResolveAssemblyReference.cache and b/TestLoopMain/obj/Debug/TestLoopMain.csprojResolveAssemblyReference.cache differ diff --git a/TestLoopMain/obj/Debug/TestLoopMain.exe b/TestLoopMain/obj/Debug/TestLoopMain.exe index ff4d5f7..fb07924 100644 Binary files a/TestLoopMain/obj/Debug/TestLoopMain.exe and b/TestLoopMain/obj/Debug/TestLoopMain.exe differ diff --git a/TestLoopMain/obj/Debug/TestLoopMain.pdb b/TestLoopMain/obj/Debug/TestLoopMain.pdb index 41e3ceb..30e66ea 100644 Binary files a/TestLoopMain/obj/Debug/TestLoopMain.pdb and b/TestLoopMain/obj/Debug/TestLoopMain.pdb differ diff --git a/TestLoopMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestLoopMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index b95fe58..6e6d856 100644 Binary files a/TestLoopMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestLoopMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestLoopMain/obj/Release/TestLoopMain.csproj.FileListAbsolute.txt b/TestLoopMain/obj/Release/TestLoopMain.csproj.FileListAbsolute.txt index da2d2df..38ea2c7 100644 --- a/TestLoopMain/obj/Release/TestLoopMain.csproj.FileListAbsolute.txt +++ b/TestLoopMain/obj/Release/TestLoopMain.csproj.FileListAbsolute.txt @@ -9,3 +9,5 @@ E:\工作目录\工作区\平台软件\ServerSuperIO\TestLoopMain\obj\Release\Te E:\工作目录\工作区\平台软件\ServerSuperIO\TestLoopMain\obj\Release\TestLoopMain.exe E:\工作目录\工作区\平台软件\ServerSuperIO\TestLoopMain\obj\Release\TestLoopMain.pdb E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestLoopMain.exe.config +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestLoopMain.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestLoopMain.pdb diff --git a/TestLoopMain/obj/Release/TestLoopMain.csprojResolveAssemblyReference.cache b/TestLoopMain/obj/Release/TestLoopMain.csprojResolveAssemblyReference.cache index 694716f..1c7fd1c 100644 Binary files a/TestLoopMain/obj/Release/TestLoopMain.csprojResolveAssemblyReference.cache and b/TestLoopMain/obj/Release/TestLoopMain.csprojResolveAssemblyReference.cache differ diff --git a/TestLoopMain/obj/Release/TestLoopMain.exe b/TestLoopMain/obj/Release/TestLoopMain.exe index d77d1c8..1c4c692 100644 Binary files a/TestLoopMain/obj/Release/TestLoopMain.exe and b/TestLoopMain/obj/Release/TestLoopMain.exe differ diff --git a/TestLoopMain/obj/Release/TestLoopMain.pdb b/TestLoopMain/obj/Release/TestLoopMain.pdb index 3a27a12..cc80f7a 100644 Binary files a/TestLoopMain/obj/Release/TestLoopMain.pdb and b/TestLoopMain/obj/Release/TestLoopMain.pdb differ diff --git a/TestParallelMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestParallelMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 8b832bc..a8e7791 100644 Binary files a/TestParallelMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestParallelMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestParallelMain/obj/Debug/TestParallelMain.csprojResolveAssemblyReference.cache b/TestParallelMain/obj/Debug/TestParallelMain.csprojResolveAssemblyReference.cache index 2c02465..3773065 100644 Binary files a/TestParallelMain/obj/Debug/TestParallelMain.csprojResolveAssemblyReference.cache and b/TestParallelMain/obj/Debug/TestParallelMain.csprojResolveAssemblyReference.cache differ diff --git a/TestParallelMain/obj/Debug/TestParallelMain.exe b/TestParallelMain/obj/Debug/TestParallelMain.exe index 04d0467..94dc98d 100644 Binary files a/TestParallelMain/obj/Debug/TestParallelMain.exe and b/TestParallelMain/obj/Debug/TestParallelMain.exe differ diff --git a/TestParallelMain/obj/Debug/TestParallelMain.pdb b/TestParallelMain/obj/Debug/TestParallelMain.pdb index 91b0ec9..d1ff9c0 100644 Binary files a/TestParallelMain/obj/Debug/TestParallelMain.pdb and b/TestParallelMain/obj/Debug/TestParallelMain.pdb differ diff --git a/TestParallelMain/obj/Debug/build.force b/TestParallelMain/obj/Debug/build.force new file mode 100644 index 0000000..e69de29 diff --git a/TestParallelMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestParallelMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 510c7a5..f483999 100644 Binary files a/TestParallelMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestParallelMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestParallelMain/obj/Release/TestParallelMain.csprojResolveAssemblyReference.cache b/TestParallelMain/obj/Release/TestParallelMain.csprojResolveAssemblyReference.cache index d262c88..cb51c12 100644 Binary files a/TestParallelMain/obj/Release/TestParallelMain.csprojResolveAssemblyReference.cache and b/TestParallelMain/obj/Release/TestParallelMain.csprojResolveAssemblyReference.cache differ diff --git a/TestParallelMain/obj/Release/TestParallelMain.exe b/TestParallelMain/obj/Release/TestParallelMain.exe index 61640db..df36bfe 100644 Binary files a/TestParallelMain/obj/Release/TestParallelMain.exe and b/TestParallelMain/obj/Release/TestParallelMain.exe differ diff --git a/TestParallelMain/obj/Release/TestParallelMain.pdb b/TestParallelMain/obj/Release/TestParallelMain.pdb index dd19eec..9cc138a 100644 Binary files a/TestParallelMain/obj/Release/TestParallelMain.pdb and b/TestParallelMain/obj/Release/TestParallelMain.pdb differ diff --git a/TestSelfMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestSelfMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 052e74a..01c15e1 100644 Binary files a/TestSelfMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestSelfMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestSelfMain/obj/Debug/TestSelfMain.csprojResolveAssemblyReference.cache b/TestSelfMain/obj/Debug/TestSelfMain.csprojResolveAssemblyReference.cache index 32b44f6..3773065 100644 Binary files a/TestSelfMain/obj/Debug/TestSelfMain.csprojResolveAssemblyReference.cache and b/TestSelfMain/obj/Debug/TestSelfMain.csprojResolveAssemblyReference.cache differ diff --git a/TestSelfMain/obj/Debug/TestSelfMain.exe b/TestSelfMain/obj/Debug/TestSelfMain.exe index 0c74a9b..1a02aee 100644 Binary files a/TestSelfMain/obj/Debug/TestSelfMain.exe and b/TestSelfMain/obj/Debug/TestSelfMain.exe differ diff --git a/TestSelfMain/obj/Debug/TestSelfMain.pdb b/TestSelfMain/obj/Debug/TestSelfMain.pdb index b83155b..2e040cd 100644 Binary files a/TestSelfMain/obj/Debug/TestSelfMain.pdb and b/TestSelfMain/obj/Debug/TestSelfMain.pdb differ diff --git a/TestSelfMain/obj/Debug/build.force b/TestSelfMain/obj/Debug/build.force new file mode 100644 index 0000000..e69de29 diff --git a/TestSelfMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestSelfMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index a021949..1c263ce 100644 Binary files a/TestSelfMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestSelfMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestSelfMain/obj/Release/TestSelfMain.csprojResolveAssemblyReference.cache b/TestSelfMain/obj/Release/TestSelfMain.csprojResolveAssemblyReference.cache index de40e50..1c7fd1c 100644 Binary files a/TestSelfMain/obj/Release/TestSelfMain.csprojResolveAssemblyReference.cache and b/TestSelfMain/obj/Release/TestSelfMain.csprojResolveAssemblyReference.cache differ diff --git a/TestSelfMain/obj/Release/TestSelfMain.exe b/TestSelfMain/obj/Release/TestSelfMain.exe index 4c3b0ff..db6b184 100644 Binary files a/TestSelfMain/obj/Release/TestSelfMain.exe and b/TestSelfMain/obj/Release/TestSelfMain.exe differ diff --git a/TestSelfMain/obj/Release/TestSelfMain.pdb b/TestSelfMain/obj/Release/TestSelfMain.pdb index 155571d..634d6a4 100644 Binary files a/TestSelfMain/obj/Release/TestSelfMain.pdb and b/TestSelfMain/obj/Release/TestSelfMain.pdb differ diff --git a/TestService/TestService.csproj b/TestService/TestService.csproj index 06adbee..fbb925d 100644 --- a/TestService/TestService.csproj +++ b/TestService/TestService.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + x86 pdbonly @@ -29,6 +30,7 @@ TRACE prompt 4 + x86 diff --git a/TestService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index bfc9910..d5efa3b 100644 Binary files a/TestService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestService/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestService/obj/Debug/TestService.csprojResolveAssemblyReference.cache b/TestService/obj/Debug/TestService.csprojResolveAssemblyReference.cache index 321a406..8883f21 100644 Binary files a/TestService/obj/Debug/TestService.csprojResolveAssemblyReference.cache and b/TestService/obj/Debug/TestService.csprojResolveAssemblyReference.cache differ diff --git a/TestService/obj/Debug/TestService.dll b/TestService/obj/Debug/TestService.dll index ed5f06e..9efa7bb 100644 Binary files a/TestService/obj/Debug/TestService.dll and b/TestService/obj/Debug/TestService.dll differ diff --git a/TestService/obj/Debug/TestService.pdb b/TestService/obj/Debug/TestService.pdb index 478d491..f7e9a58 100644 Binary files a/TestService/obj/Debug/TestService.pdb and b/TestService/obj/Debug/TestService.pdb differ diff --git a/TestService/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestService/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index e1d7ef0..fad9551 100644 Binary files a/TestService/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestService/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestService/obj/Release/TestService.csprojResolveAssemblyReference.cache b/TestService/obj/Release/TestService.csprojResolveAssemblyReference.cache index 660792a..6deacbe 100644 Binary files a/TestService/obj/Release/TestService.csprojResolveAssemblyReference.cache and b/TestService/obj/Release/TestService.csprojResolveAssemblyReference.cache differ diff --git a/TestService/obj/Release/TestService.dll b/TestService/obj/Release/TestService.dll index 0029d5f..4f594b0 100644 Binary files a/TestService/obj/Release/TestService.dll and b/TestService/obj/Release/TestService.dll differ diff --git a/TestService/obj/Release/TestService.pdb b/TestService/obj/Release/TestService.pdb index 473cd3d..e883c49 100644 Binary files a/TestService/obj/Release/TestService.pdb and b/TestService/obj/Release/TestService.pdb differ diff --git a/TestShowForm/TestShowForm.csproj b/TestShowForm/TestShowForm.csproj index 4f7bdc7..f6f857e 100644 --- a/TestShowForm/TestShowForm.csproj +++ b/TestShowForm/TestShowForm.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + x86 pdbonly @@ -29,6 +30,7 @@ TRACE prompt 4 + x86 diff --git a/TestShowForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestShowForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 95dbdc3..2fd0018 100644 Binary files a/TestShowForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestShowForm/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestShowForm/obj/Debug/TestShowForm.csproj.GenerateResource.Cache b/TestShowForm/obj/Debug/TestShowForm.csproj.GenerateResource.Cache index 69c50d6..4a747a3 100644 Binary files a/TestShowForm/obj/Debug/TestShowForm.csproj.GenerateResource.Cache and b/TestShowForm/obj/Debug/TestShowForm.csproj.GenerateResource.Cache differ diff --git a/TestShowForm/obj/Debug/TestShowForm.csprojResolveAssemblyReference.cache b/TestShowForm/obj/Debug/TestShowForm.csprojResolveAssemblyReference.cache index 321a406..8883f21 100644 Binary files a/TestShowForm/obj/Debug/TestShowForm.csprojResolveAssemblyReference.cache and b/TestShowForm/obj/Debug/TestShowForm.csprojResolveAssemblyReference.cache differ diff --git a/TestShowForm/obj/Debug/TestShowForm.dll b/TestShowForm/obj/Debug/TestShowForm.dll index a14d2af..4eec611 100644 Binary files a/TestShowForm/obj/Debug/TestShowForm.dll and b/TestShowForm/obj/Debug/TestShowForm.dll differ diff --git a/TestShowForm/obj/Debug/TestShowForm.pdb b/TestShowForm/obj/Debug/TestShowForm.pdb index 8ae90e1..59ebe5e 100644 Binary files a/TestShowForm/obj/Debug/TestShowForm.pdb and b/TestShowForm/obj/Debug/TestShowForm.pdb differ diff --git a/TestShowForm/obj/Release/DesignTimeResolveAssemblyReferences.cache b/TestShowForm/obj/Release/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..62451ac Binary files /dev/null and b/TestShowForm/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/TestShowForm/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestShowForm/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index d05a70b..117d253 100644 Binary files a/TestShowForm/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestShowForm/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestShowForm/obj/Release/TestShowForm.csproj.GenerateResource.Cache b/TestShowForm/obj/Release/TestShowForm.csproj.GenerateResource.Cache index 69c50d6..4a747a3 100644 Binary files a/TestShowForm/obj/Release/TestShowForm.csproj.GenerateResource.Cache and b/TestShowForm/obj/Release/TestShowForm.csproj.GenerateResource.Cache differ diff --git a/TestShowForm/obj/Release/TestShowForm.csprojResolveAssemblyReference.cache b/TestShowForm/obj/Release/TestShowForm.csprojResolveAssemblyReference.cache index 1d82f33..6deacbe 100644 Binary files a/TestShowForm/obj/Release/TestShowForm.csprojResolveAssemblyReference.cache and b/TestShowForm/obj/Release/TestShowForm.csprojResolveAssemblyReference.cache differ diff --git a/TestShowForm/obj/Release/TestShowForm.dll b/TestShowForm/obj/Release/TestShowForm.dll index fa2d707..f894fd6 100644 Binary files a/TestShowForm/obj/Release/TestShowForm.dll and b/TestShowForm/obj/Release/TestShowForm.dll differ diff --git a/TestShowForm/obj/Release/TestShowForm.pdb b/TestShowForm/obj/Release/TestShowForm.pdb index 083011d..d669066 100644 Binary files a/TestShowForm/obj/Release/TestShowForm.pdb and b/TestShowForm/obj/Release/TestShowForm.pdb differ diff --git a/TestSingletonMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestSingletonMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index c19de2f..eefb528 100644 Binary files a/TestSingletonMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestSingletonMain/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestSingletonMain/obj/Debug/TestSingletonMain.csprojResolveAssemblyReference.cache b/TestSingletonMain/obj/Debug/TestSingletonMain.csprojResolveAssemblyReference.cache index da94c29..42309cc 100644 Binary files a/TestSingletonMain/obj/Debug/TestSingletonMain.csprojResolveAssemblyReference.cache and b/TestSingletonMain/obj/Debug/TestSingletonMain.csprojResolveAssemblyReference.cache differ diff --git a/TestSingletonMain/obj/Debug/TestSingletonMain.exe b/TestSingletonMain/obj/Debug/TestSingletonMain.exe index 1e19cf0..4831280 100644 Binary files a/TestSingletonMain/obj/Debug/TestSingletonMain.exe and b/TestSingletonMain/obj/Debug/TestSingletonMain.exe differ diff --git a/TestSingletonMain/obj/Debug/TestSingletonMain.pdb b/TestSingletonMain/obj/Debug/TestSingletonMain.pdb index a5018ec..647259b 100644 Binary files a/TestSingletonMain/obj/Debug/TestSingletonMain.pdb and b/TestSingletonMain/obj/Debug/TestSingletonMain.pdb differ diff --git a/TestSingletonMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestSingletonMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 0024806..42495ba 100644 Binary files a/TestSingletonMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestSingletonMain/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestSingletonMain/obj/Release/TestSingletonMain.csproj.FileListAbsolute.txt b/TestSingletonMain/obj/Release/TestSingletonMain.csproj.FileListAbsolute.txt index 71c6a41..604af2f 100644 --- a/TestSingletonMain/obj/Release/TestSingletonMain.csproj.FileListAbsolute.txt +++ b/TestSingletonMain/obj/Release/TestSingletonMain.csproj.FileListAbsolute.txt @@ -1 +1,6 @@ E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestSingletonMain.exe.config +E:\工作目录\工作区\平台软件\ServerSuperIO\TestSingletonMain\obj\Release\TestSingletonMain.csprojResolveAssemblyReference.cache +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestSingletonMain.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestSingletonMain.pdb +E:\工作目录\工作区\平台软件\ServerSuperIO\TestSingletonMain\obj\Release\TestSingletonMain.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\TestSingletonMain\obj\Release\TestSingletonMain.pdb diff --git a/TestSingletonMain/obj/Release/TestSingletonMain.csprojResolveAssemblyReference.cache b/TestSingletonMain/obj/Release/TestSingletonMain.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c076f45 Binary files /dev/null and b/TestSingletonMain/obj/Release/TestSingletonMain.csprojResolveAssemblyReference.cache differ diff --git a/TestSingletonMain/obj/Release/TestSingletonMain.exe b/TestSingletonMain/obj/Release/TestSingletonMain.exe new file mode 100644 index 0000000..d2b70c8 Binary files /dev/null and b/TestSingletonMain/obj/Release/TestSingletonMain.exe differ diff --git a/TestSingletonMain/obj/Release/TestSingletonMain.pdb b/TestSingletonMain/obj/Release/TestSingletonMain.pdb new file mode 100644 index 0000000..b0737ac Binary files /dev/null and b/TestSingletonMain/obj/Release/TestSingletonMain.pdb differ diff --git a/TestTcpListener/Program.cs b/TestTcpListener/Program.cs index 25f8b4e..8a71ff4 100644 --- a/TestTcpListener/Program.cs +++ b/TestTcpListener/Program.cs @@ -20,6 +20,7 @@ static void Main(string[] args) { _server=new Server("myserver",new Config { + SocketMode = SocketMode.Udp, ControlMode=ControlMode.Parallel, IsCheckSameSocketSession = false, }); diff --git a/TestTcpListener/TestTcpListener.csproj b/TestTcpListener/TestTcpListener.csproj index f9a6cb7..2656a58 100644 --- a/TestTcpListener/TestTcpListener.csproj +++ b/TestTcpListener/TestTcpListener.csproj @@ -15,7 +15,7 @@ 2.0 - AnyCPU + x86 true full false @@ -26,7 +26,7 @@ true - AnyCPU + x86 pdbonly true ..\bin\ diff --git a/TestTcpListener/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestTcpListener/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 7eec021..1aa5d05 100644 Binary files a/TestTcpListener/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestTcpListener/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestTcpListener/obj/Debug/TestTcpListener.csprojResolveAssemblyReference.cache b/TestTcpListener/obj/Debug/TestTcpListener.csprojResolveAssemblyReference.cache index 1f11ab9..a66467a 100644 Binary files a/TestTcpListener/obj/Debug/TestTcpListener.csprojResolveAssemblyReference.cache and b/TestTcpListener/obj/Debug/TestTcpListener.csprojResolveAssemblyReference.cache differ diff --git a/TestTcpListener/obj/Debug/TestTcpListener.exe b/TestTcpListener/obj/Debug/TestTcpListener.exe index bead385..e92a7d4 100644 Binary files a/TestTcpListener/obj/Debug/TestTcpListener.exe and b/TestTcpListener/obj/Debug/TestTcpListener.exe differ diff --git a/TestTcpListener/obj/Debug/TestTcpListener.pdb b/TestTcpListener/obj/Debug/TestTcpListener.pdb index 005f916..ea5d797 100644 Binary files a/TestTcpListener/obj/Debug/TestTcpListener.pdb and b/TestTcpListener/obj/Debug/TestTcpListener.pdb differ diff --git a/TestTcpListener/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/TestTcpListener/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index c6c7832..5442016 100644 Binary files a/TestTcpListener/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/TestTcpListener/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestTcpListener/obj/Release/TestTcpListener.csproj.FileListAbsolute.txt b/TestTcpListener/obj/Release/TestTcpListener.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ba3e5df --- /dev/null +++ b/TestTcpListener/obj/Release/TestTcpListener.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestTcpListener.exe.config +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestTcpListener.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\bin\TestTcpListener.pdb +E:\工作目录\工作区\平台软件\ServerSuperIO\TestTcpListener\obj\Release\TestTcpListener.csprojResolveAssemblyReference.cache +E:\工作目录\工作区\平台软件\ServerSuperIO\TestTcpListener\obj\Release\TestTcpListener.exe +E:\工作目录\工作区\平台软件\ServerSuperIO\TestTcpListener\obj\Release\TestTcpListener.pdb diff --git a/TestTcpListener/obj/Release/TestTcpListener.csprojResolveAssemblyReference.cache b/TestTcpListener/obj/Release/TestTcpListener.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..642fe7d Binary files /dev/null and b/TestTcpListener/obj/Release/TestTcpListener.csprojResolveAssemblyReference.cache differ diff --git a/TestTcpListener/obj/Release/TestTcpListener.exe b/TestTcpListener/obj/Release/TestTcpListener.exe new file mode 100644 index 0000000..5ce5d25 Binary files /dev/null and b/TestTcpListener/obj/Release/TestTcpListener.exe differ diff --git a/TestTcpListener/obj/Release/TestTcpListener.pdb b/TestTcpListener/obj/Release/TestTcpListener.pdb new file mode 100644 index 0000000..0f30b27 Binary files /dev/null and b/TestTcpListener/obj/Release/TestTcpListener.pdb differ diff --git a/bin/ServerSuperIO.dll b/bin/ServerSuperIO.dll new file mode 100644 index 0000000..dfd5e64 Binary files /dev/null and b/bin/ServerSuperIO.dll differ diff --git a/bin/ServerSuperIO.pdb b/bin/ServerSuperIO.pdb new file mode 100644 index 0000000..1902abd Binary files /dev/null and b/bin/ServerSuperIO.pdb differ diff --git a/bin/TestDeviceDriver.dll b/bin/TestDeviceDriver.dll new file mode 100644 index 0000000..e43f86c Binary files /dev/null and b/bin/TestDeviceDriver.dll differ diff --git a/bin/TestDeviceDriver.pdb b/bin/TestDeviceDriver.pdb new file mode 100644 index 0000000..00caaf3 Binary files /dev/null and b/bin/TestDeviceDriver.pdb differ diff --git a/bin/TestHareware.exe b/bin/TestHareware.exe new file mode 100644 index 0000000..f685ed9 Binary files /dev/null and b/bin/TestHareware.exe differ diff --git a/bin/TestHareware.exe.config b/bin/TestHareware.exe.config new file mode 100644 index 0000000..58262a1 --- /dev/null +++ b/bin/TestHareware.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/bin/TestHareware.pdb b/bin/TestHareware.pdb new file mode 100644 index 0000000..fbb51d3 Binary files /dev/null and b/bin/TestHareware.pdb differ diff --git a/bin/TestLog.exe b/bin/TestLog.exe new file mode 100644 index 0000000..95ad2cc Binary files /dev/null and b/bin/TestLog.exe differ diff --git a/bin/TestLog.exe.config b/bin/TestLog.exe.config new file mode 100644 index 0000000..58262a1 --- /dev/null +++ b/bin/TestLog.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/bin/TestLog.pdb b/bin/TestLog.pdb new file mode 100644 index 0000000..0255122 Binary files /dev/null and b/bin/TestLog.pdb differ diff --git a/bin/TestLoopMain.exe b/bin/TestLoopMain.exe new file mode 100644 index 0000000..fb07924 Binary files /dev/null and b/bin/TestLoopMain.exe differ diff --git a/bin/TestLoopMain.exe.config b/bin/TestLoopMain.exe.config new file mode 100644 index 0000000..58262a1 --- /dev/null +++ b/bin/TestLoopMain.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/bin/TestLoopMain.pdb b/bin/TestLoopMain.pdb new file mode 100644 index 0000000..30e66ea Binary files /dev/null and b/bin/TestLoopMain.pdb differ diff --git a/bin/TestLoopMain.vshost.exe b/bin/TestLoopMain.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/bin/TestLoopMain.vshost.exe differ diff --git a/bin/TestLoopMain.vshost.exe.config b/bin/TestLoopMain.vshost.exe.config new file mode 100644 index 0000000..58262a1 --- /dev/null +++ b/bin/TestLoopMain.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/bin/TestLoopMain.vshost.exe.manifest b/bin/TestLoopMain.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/bin/TestLoopMain.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/bin/TestParallelMain.exe b/bin/TestParallelMain.exe new file mode 100644 index 0000000..94dc98d Binary files /dev/null and b/bin/TestParallelMain.exe differ diff --git a/bin/TestParallelMain.exe.config b/bin/TestParallelMain.exe.config new file mode 100644 index 0000000..58262a1 --- /dev/null +++ b/bin/TestParallelMain.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/bin/TestParallelMain.pdb b/bin/TestParallelMain.pdb new file mode 100644 index 0000000..d1ff9c0 Binary files /dev/null and b/bin/TestParallelMain.pdb differ diff --git a/bin/TestSelfMain.exe b/bin/TestSelfMain.exe new file mode 100644 index 0000000..1a02aee Binary files /dev/null and b/bin/TestSelfMain.exe differ diff --git a/bin/TestSelfMain.exe.config b/bin/TestSelfMain.exe.config new file mode 100644 index 0000000..58262a1 --- /dev/null +++ b/bin/TestSelfMain.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/bin/TestSelfMain.pdb b/bin/TestSelfMain.pdb new file mode 100644 index 0000000..2e040cd Binary files /dev/null and b/bin/TestSelfMain.pdb differ diff --git a/bin/TestService.dll b/bin/TestService.dll new file mode 100644 index 0000000..9efa7bb Binary files /dev/null and b/bin/TestService.dll differ diff --git a/bin/TestService.pdb b/bin/TestService.pdb new file mode 100644 index 0000000..f7e9a58 Binary files /dev/null and b/bin/TestService.pdb differ diff --git a/bin/TestShowForm.dll b/bin/TestShowForm.dll new file mode 100644 index 0000000..4eec611 Binary files /dev/null and b/bin/TestShowForm.dll differ diff --git a/bin/TestShowForm.pdb b/bin/TestShowForm.pdb new file mode 100644 index 0000000..59ebe5e Binary files /dev/null and b/bin/TestShowForm.pdb differ diff --git a/bin/TestSingletonMain.exe b/bin/TestSingletonMain.exe new file mode 100644 index 0000000..4831280 Binary files /dev/null and b/bin/TestSingletonMain.exe differ diff --git a/bin/TestSingletonMain.exe.config b/bin/TestSingletonMain.exe.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/bin/TestSingletonMain.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/TestSingletonMain.pdb b/bin/TestSingletonMain.pdb new file mode 100644 index 0000000..647259b Binary files /dev/null and b/bin/TestSingletonMain.pdb differ diff --git a/bin/TestSingletonMain.vshost.exe b/bin/TestSingletonMain.vshost.exe new file mode 100644 index 0000000..8c84517 Binary files /dev/null and b/bin/TestSingletonMain.vshost.exe differ diff --git a/bin/TestSingletonMain.vshost.exe.config b/bin/TestSingletonMain.vshost.exe.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/bin/TestSingletonMain.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/TestSingletonMain.vshost.exe.manifest b/bin/TestSingletonMain.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/bin/TestSingletonMain.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/bin/TestTcpListener.exe b/bin/TestTcpListener.exe new file mode 100644 index 0000000..e92a7d4 Binary files /dev/null and b/bin/TestTcpListener.exe differ diff --git a/bin/TestTcpListener.exe.config b/bin/TestTcpListener.exe.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/bin/TestTcpListener.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/TestTcpListener.pdb b/bin/TestTcpListener.pdb new file mode 100644 index 0000000..ea5d797 Binary files /dev/null and b/bin/TestTcpListener.pdb differ diff --git a/bin/TestTcpListener.vshost.exe b/bin/TestTcpListener.vshost.exe new file mode 100644 index 0000000..8c84517 Binary files /dev/null and b/bin/TestTcpListener.vshost.exe differ diff --git a/bin/TestTcpListener.vshost.exe.config b/bin/TestTcpListener.vshost.exe.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/bin/TestTcpListener.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/TestTcpListener.vshost.exe.manifest b/bin/TestTcpListener.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/bin/TestTcpListener.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git "a/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-01_myserver_INFO.txt" "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-01_myserver_INFO.txt" new file mode 100644 index 0000000..c63df6d --- /dev/null +++ "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-01_myserver_INFO.txt" @@ -0,0 +1,66 @@ +[16-04-01 15:37:49]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:37:49]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:37:49]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:44:48]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:44:50]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:44:53]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:47:00]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:47:00]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:47:00]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:50:24]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:50:24]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:50:24]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:50:52]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:50:52]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:50:52]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:55:49]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:55:49]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:55:49]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:58:32]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:58:32]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:58:34]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:59:53]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:59:53]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 15:59:53]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:00:11]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:00:21]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:00:25]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:01:19]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:01:19]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:01:19]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:25:19]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:25:19]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-01 16:25:19]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint diff --git "a/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-01_\346\234\215\345\212\2411_INFO.txt" "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-01_\346\234\215\345\212\2411_INFO.txt" new file mode 100644 index 0000000..fca7766 --- /dev/null +++ "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-01_\346\234\215\345\212\2411_INFO.txt" @@ -0,0 +1,7 @@ +[16-04-01 15:35:41]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-01 15:35:41]>><应用服务>增加服务成功 +[16-04-01 15:35:41]>><显示视图>显示视图显示成功 +[16-04-01 15:35:43]>><显示视图>显示视图关闭成功 +[16-04-01 15:36:08]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-01 15:36:08]>><应用服务>增加服务成功 +[16-04-01 15:36:08]>><显示视图>显示视图显示成功 diff --git "a/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_myserver_ERROR.txt" "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_myserver_ERROR.txt" new file mode 100644 index 0000000..8f7dcb9 --- /dev/null +++ "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_myserver_ERROR.txt" @@ -0,0 +1,10 @@ +[16-04-05 16:38:40]>> +未将对象引用设置到对象的实例。 在 ServerSuperIO.Communicate.NET.UdpSocketSession.SocketEventArgs_Completed(Object sender, SocketAsyncEventArgs e) 位置 e:\工作目录\工作区\平台软件\ServerSuperIO\ServerSuperIO\Communicate\NET\UdpSocketSession.cs:行号 101 + 在 System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e) + 在 System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(Object ignored) + 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) + 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) + 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) + 在 System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags) + 在 System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) + 在 System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) diff --git "a/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_myserver_INFO.txt" "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_myserver_INFO.txt" new file mode 100644 index 0000000..5d74680 --- /dev/null +++ "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_myserver_INFO.txt" @@ -0,0 +1,42 @@ +[16-04-05 14:41:30]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 14:41:30]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 14:41:30]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 14:51:05]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 14:51:05]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 14:51:05]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 14:51:39]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 14:51:39]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 14:51:39]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:37:11]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:37:11]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:37:11]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:37:52]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:37:52]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:37:52]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:38:56]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:38:56]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:38:56]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:40:40]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:40:40]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:40:40]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint diff --git "a/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_\346\234\215\345\212\2411_INFO.txt" "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_\346\234\215\345\212\2411_INFO.txt" new file mode 100644 index 0000000..3e4afe5 --- /dev/null +++ "b/bin/\346\227\245\345\277\227\344\277\241\346\201\257/2016-04-05_\346\234\215\345\212\2411_INFO.txt" @@ -0,0 +1,85 @@ +[16-04-05 16:42:33]>>增加'设备1'串口设备,串口:1 波特率:9600,成功 +[16-04-05 16:42:33]>>增加'设备2'串口设备,串口:3 波特率:9600,成功 +[16-04-05 16:42:33]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:42:33]>>增加'设备4'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:42:33]>><应用服务>增加服务成功 +[16-04-05 16:42:33]>><显示视图>显示视图显示成功 +[16-04-05 16:42:41]>><显示视图>显示视图关闭成功 +[16-04-05 16:43:15]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:43:15]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:43:15]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:43:15]>>增加'设备1'串口设备,串口:1 波特率:9600,成功 +[16-04-05 16:43:15]>>增加'设备2'串口设备,串口:3 波特率:9600,成功 +[16-04-05 16:43:15]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:43:15]>>增加'设备4'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:43:15]>><应用服务>增加服务成功 +[16-04-05 16:43:15]>><显示视图>显示视图显示成功 +[16-04-05 16:43:16]>><显示视图>显示视图关闭成功 +[16-04-05 16:45:23]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:45:23]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:45:23]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:45:23]>>增加'设备1'串口设备,串口:1 波特率:9600,成功 +[16-04-05 16:45:23]>>增加'设备2'串口设备,串口:3 波特率:9600,成功 +[16-04-05 16:45:23]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:45:23]>>增加'设备4'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:45:23]>><应用服务>增加服务成功 +[16-04-05 16:45:23]>><显示视图>显示视图显示成功 +[16-04-05 16:45:24]>><显示视图>显示视图关闭成功 +[16-04-05 16:47:15]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:47:15]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:47:15]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:47:15]>>增加'设备1'串口设备,串口:1 波特率:9600,成功 +[16-04-05 16:47:15]>>增加'设备2'串口设备,串口:3 波特率:9600,成功 +[16-04-05 16:47:15]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:47:15]>>增加'设备4'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:47:15]>><应用服务>增加服务成功 +[16-04-05 16:47:15]>><显示视图>显示视图显示成功 +[16-04-05 16:47:17]>><显示视图>显示视图关闭成功 +[16-04-05 16:48:03]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:48:03]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:48:03]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:48:03]>>增加'设备1'串口设备,串口:1 波特率:9600,成功 +[16-04-05 16:48:03]>>增加'设备2'串口设备,串口:3 波特率:9600,成功 +[16-04-05 16:48:03]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:48:03]>>增加'设备4'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:48:03]>><应用服务>增加服务成功 +[16-04-05 16:48:03]>><显示视图>显示视图显示成功 +[16-04-05 16:48:04]>><显示视图>显示视图关闭成功 +[16-04-05 16:49:45]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:49:45]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:49:45]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:49:45]>>增加'设备1'串口设备,串口:1 波特率:9600,成功 +[16-04-05 16:49:45]>>增加'设备2'串口设备,串口:3 波特率:9600,成功 +[16-04-05 16:49:45]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:49:45]>>增加'设备4'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:49:45]>><应用服务>增加服务成功 +[16-04-05 16:49:45]>><显示视图>显示视图显示成功 +[16-04-05 16:49:46]>><显示视图>显示视图关闭成功 +[16-04-05 16:51:02]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:51:02]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:51:02]>>提供的 AddressFamily InterNetwork 的终结点对于此套接字无效,请改用 InterNetworkV6。 +参数名: RemoteEndPoint +[16-04-05 16:51:02]>>增加'设备1'串口设备,串口:1 波特率:9600,成功 +[16-04-05 16:51:02]>>增加'设备2'串口设备,串口:3 波特率:9600,成功 +[16-04-05 16:51:02]>>增加'设备3'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:51:02]>>增加'设备4'网络设备,IP地址:127.0.0.1 端口:9600,成功 +[16-04-05 16:51:02]>><应用服务>增加服务成功 +[16-04-05 16:51:02]>><显示视图>显示视图显示成功 +[16-04-05 16:51:04]>><显示视图>显示视图关闭成功