SuperSocket Quick Start (1): What is SuperSocket?

Source: Internet
Author: User

SuperSocket Quick Start (1): What is SuperSocket?
What is SuperSocket

SuperSocket (SS) is a lightweight, cross-platform and scalable. Net/Mono Socket server program framework. You don't need to know how to use Socket, how to maintain Socket connection and how to work, but you can use SuperSocket to easily develop a Socket server software, such as a game server, GPS servers, industrial control services, and data collection servers.

Features
  • High-performance event-driven communication;
  • It is very easy to use. You only need to create several classes to obtain a robust Socket server;
  • The built-in command line protocol allows you to quickly create a network command line interface server;
  • Powerful and high-performance Protocol Resolution implementation tools help you simplify the analysis of network data;
  • Flexible configuration functions and friendly configuration APIS;
  • Multi-listener support; allows you to listen to multiple ports in a server instance;
  • The support for multi-server instance hosting allows you to easily face complex deployment needs;
  • Application domain and process-level isolation can meet most of your host scenarios;
  • Built-in SSL/TLS encryption support;
  • Session-level sending queues allow you to send data concurrently through sessions and maintain high performance and controllability;
  • The SuperSocket command processing mode makes your business logic clearer and more organized;
  • Excellent scalable API support: Command Filter, Connection Filter, and Command Loader;
  • The replaceable log architecture allows you to use your favorite log components;
  • Support for dynamic languages; allows you to use scripting languages such as Python to implement commands;
  • Binary Compatibility with Mono/Linux;
  • Windows Azure support;
  • Built-in Socket policy servers that can be directly used for Flash or Silverlight clients;
Preface

SS is based on. net iocp AsyncSocketEventArgs for development and design, many friends in the group asked how SS performance, I think this problem still needs to be based on your own program, if from the example, there are a lot of AsyncSocketEventArgs performance on the Internet, as well as examples, which can be tested. Hey.

  If you need to have a deep understanding of SS, develop it over SS, and follow relevant content in my subsequent articles, you need to have a certain understanding of SOCKET, generic, Lambda expressions, and event-driven, this knowledge will not be explained separately.

This is a lightweight, event-driven framework for the first time when you contact SS. before using it, please read the documents on the official website. If you think it is a waste of time to read the documents, then you can directly use native Socket, AsyncSocketEventArgs or TcpListener, which is simple and convenient.

Many friends want to use their own protocols, so they should take a closer look at the document (using IRequestInfo, IReceiveFilter, and other objects to implement custom protocols, if you do not know how to implement custom settings, you are not recommended to use SS.

SuperSocket Request Processing Model

This section has summarized the SS process, but missing a ConnectionFilter. When the Client-> SocketListener is used, if the connection filter is implemented, it will first be filtered during Client connect.

In the group, many friends asked why the data was not collected? First, understand what communication protocols are. Simply put, convert the received binary data into rules, as shown in. When the client sends a binary code, it is filtered by ReceiveFilter, parse the binary content that complies with the rule, convert it to the corresponding object, and then execute the processing.

★The SS has built-in common protocols as follows:

  • Command Line Protocol: it is also the default protocol for AppServer. Each protocol ends with a line break \ r \ n. Format: Command Arg1 Arg2 ArgN \ r \ n. Note: many friends forget \ r \ n. There are also a lot of Chinese friends will appear garbled, garbled because the default configuration of textEncoding for ASCII, change to UTF-8 or GBK.
  • TerminatorReceiveFilter: similar to the command line protocol, some protocols use Terminators to determine a request in the format of AnyData... ##, ending.
  • CountSpliterReceiveFilter: Some Protocols define requests in the format of # part1 # part2 # part3 # part4 # part5 # part6 # part7 #. Each request has seven parts separated.
  • FixedSizeReceiveFilter: in this Protocol, all requests are of the same size. If each of your requests is a string of 9 characters, such as kill bill.
  • BeginEndMarkReceiveFilter: each request of this type of Protocol has a fixed start and end mark. Format :! Xxxxxxxxxxxxxx $ ,'! 'Is the start tag,' $ 'is the end tag.
  • FixedHeaderReceiveFilter: This Protocol defines a request as two parts, for example, the first part defines the Request Name, the second part contains the length of the subsequent content and the specific content of the third part. For example: | name (4) | len (2) | content |, 4-byte name, 2-byte content length, specific content.

Http://www.supersocket.net

Official documentation: http://docs.supersocket.net

SuperSocket user QQ group: 373076764 (500 people, the correct answer should be answered when entering the group, otherwise all requests will be rejected)

========================================================== ========================================================== ======================================

Related Article

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.