Cocoon into a butterfly, open source networksocket communication components

Source: Internet
Author: User

Before and after the preface lasted three years, during a large number of references. Net framework and ASP.NET MVC source code, write-delete and re-refactor, components are now updated to v1.5.x. From the old ugly duckling to today has a stable and powerful TCP protocol support base layer, native support HTTP, websocket, Flash Policy Service, and built-in fast protocol that can quickly build TCP communication, most importantly, can be based on this component, It is convenient to develop some kind of TCP upper layer protocol server and client that you define. If someone is proud of the support features, I am proud to support the extensibility, from WebForm to MVC, by its can rely on injection, filter filters, modelbinding and reflection to execute action and other novel ideas shook! It is now a pleasure to imitate and use these ideas in this component as well. The functionality of the component 1, the TCP server abstract class and the client abstract class, and the associated stream read-write function classes, byte and bit operations, and other functional classes. All services based on TCP-standard protocols and personal custom protocols are developed based on this inheritance, and abstract classes have implemented many of the most basic functions. 2, built-in Flash and Silverlight policy service class, support inheritance rewrite some functions. 3, built-in HTTP Service module, writing HTTP service style habits and asp.net mvc extremely consistent, only the difference does not support the view. 4, built-in WebSocket service module, while encapsulating JSON-based jsonwebsocket services and client-side script, from IE6 to Chrome web duplex communication is no longer a dream, writing Jsonwebsocket service style habits and mvc consistent. 5. Built-in custom personal protocol named Fast, developed. NET internal use of the system, can ignore communication knowledge can write TCP duplex service, writing service style habits and MVC consistent, the client does not need to write additional. 6, built-in can also use in the EF model verification features, when writing various services, model verification is not disgusting a lump accounted for half of the function if. 7, powerful FILTER,AOP ideas can be used in the HTTP, Jsonwebsocket, fast service writing, the most thorough, log, exception and permission verification has become so simple. 8, Dependency injection support, can replace the default dependency resolution provided, such as using AUTOFAC and other excellent dependency injection provider to reduce coupling or life cycle management, filter also supports dependency injection. Framework concept I think sometimes in the TCP this blog related views and comments more irritable, sometimes want to blame or find out the shortcomings of others to highlight their own in this field, this is very bad, but a lot of time should be relatively flat. But I hate to ask me this is not the same as some other ideas related to the ideaComponent comparison results, each frame has its own concept, some are not comparable, or less than the results, like MVC and MVVM, I say all good, I want to use the person to understand first, and then combine their own needs, compare the choice. My idea is to build a stable base layer that supports standard protocols that can be brought but not confined to a custom protocol (such as a fast protocol in a component). If the component is a custom protocol from beginning to end, it should be a private key, leaving the lock as scrap metal (if the protocol is widely spread). Of course, the master key does not exist, but when the lock is someone else's, see, can pass this component low cost the corresponding key to build out, this is my idea. Component porting components are not dependent on any third-party libraries, and are designed to ensure small size and portability. The serialization of the default implementation is replaceable at migration time. 1, mono compilation without modifying any code; 2. Net core porting you want to modify a small amount of code without affecting the logical changes, just serializing the associated code. Component applicability If you have used MVC, then using this component you can easily achieve the following requirements: 1, in all common browsers to achieve duplex communication such as timely notification and timely chat, etc., never feel that the boss want to push in the web is not a pervert. 2,. NET down-duplex communication project, simpler than WCF, no need to focus on communication knowledge. 3, mixed Protocol transfer service, you can build a multi-protocol support services, such as the browser using HTTP and websocket, mobile phone use of HTTP, and other hardware using some custom TCP protocol, to multi-terminal control hardware. 4, write some clients, or some other services, such as Redis and so on. NET drive, or Telnet server, or other protocol that you have customized. Source Code and Demo

Https://github.com/xljiulang/NetworkSocket

You can take a little look at the demo and know how to use it.

PostScript this year to write many of the blog is a part of the inside of a certain corner, and some even seemingly no matter the same, but are the components behind the silently working objects. Since there is no such a complete description of the components of the face, because the time is not yet, in the design of the filter, has been completely imitated MVC4 filter, because of the different context of the Protocol, each protocol has to write dubious filter, like MVC and WEBAPI filter, Similar but not the same, later reconstruction, the rejection of the original filter design ideas, the development of a common filter base, although imitated also borrowed, but if not suitable, also dare to deny. Space is limited, a few words, not to mention all aspects, so pick a few important points affixed to Sven.

Cocoon into a butterfly, open source networksocket communication components

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.