C# TCP 框架

1. TCP框架之间的数据通信的事件机制

http://www.cnblogs.com/gaochundong/p/csharp_tcp_service_models.html

本篇文章的主旨是使用 .NET/C# 实现 TCP 高性能服务的不同方式,包括但不限于如下内容:

https://github.com/Azure/DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework

http://bbs.cskin.net/thread-440-1-1.html

https://github.com/MisayaJj/HighPerformanceServer

[helios-dev]

  1. 最新版本是.NET4.5, 如果想要支持.NET4.0,我的开发工具是vs2015之前使用vs2010打开不开项目

  2. 将代码文件src项目单独拿出来,然后使用vs2015打开,然后将项目.NET框架设置为.net4.0

  3. 然后设置一些编译选项,打开.net40编译选项

http://stackoverflow.com/questions/5268177/is-there-anyway-to-define-constant-on-a-solution-basis

Is There anyway to #define Constant on a Solution Basis?

#if !net35 && !net40 && !net40
        public static networkdata create(udpreceiveresult receiveresult)
        {
            return new networkdata()
            {
                buffer = receiveresult.buffer,
                length = receiveresult.buffer.length,
                remotehost = receiveresult.remoteendpoint.tonode(transporttype.udp)
            };
        }
#endif

原文地址:https://www.cnblogs.com/pengxinglove/p/5402748.html