超快速、低延迟的异步套接字服务器和客户端 C# .NET Core 库,支持 TCP、SSL、UDP、HTTP、HTTPS、WebSocket 协议以及 10K 连接。
超快速、低延迟的异步套接字服务器和客户端 C# .NET Core 库,支持 TCP、SSL、UDP、HTTP、HTTPS、WebSocket 协议以及 10K 连接。
Has integration with high-level message protocol based on Fast Binary Encoding
NetCoreServer documentation
NetCoreServer downloads
Optional:
git clone https://github.com/chronoxor/NetCoreServer.git
cd NetCoreServer
cd build
./unix.sh
cd build
./unix.sh
Open and build NetCoreServer.sln or run the build script:
cd build
vs.bat
The build script will create "release" directory with zip files:
Here comes the example of the TCP chat server. It handles multiple TCP client sessions and multicast received message from any session to all ones. Also it is possible to send admin message directly from the server.
…
Here comes the example of the TCP chat client. It connects to the TCP chat server and allows to send message to it and receive new messages.
…
Here comes the example of the SSL chat server. It handles multiple SSL client sessions and multicast received message from any session to all ones. Also it is possible to send admin message directly from the server.
This example is very similar to the TCP one except the code that prepares SSL context and handshake handler.
…
Here comes the example of the SSL chat client. It connects to the SSL chat server and allows to send message to it and receive new messages.
This example is very similar to the TCP one except the code that prepares SSL context and handshake handler.
…
Here comes the example of the UDP echo server. It receives a datagram mesage from any UDP client and resend it back without any changes.
…
Here comes the example of the UDP echo client. It sends user datagram message to UDP server and listen for response.
…
Here comes the example of the UDP multicast server. It use multicast IP address to multicast datagram messages to all client that joined corresponding UDP multicast group.
…
Here comes the example of the UDP multicast client. It use multicast IP address and joins UDP multicast group in order to receive multicasted datagram messages from UDP server.
…
Here comes the example of the Unix Domain Socket chat server. It handles multiple Unix Domain Socket client sessions and multicast received message from any session to all ones. Also it is possible to send admin message directly from the server.
…
Here comes the example of the Unix Domain Socket chat client. It connects to the Unix Domain Socket chat server and allows to send message to it and receive new messages.
…
Simple protocol is defined in simple.fbe file:
…
Here comes the example of the simple protocol server. It process client requests, answer with corresponding responses and send server notifications back to clients.
…
Here comes the example of the simple protocol client. It connects to the simple protocol server and allows to send requests to it and receive corresponding responses.
…
Here comes the example of the HTTP cache server. It allows to manipulate cache data with HTTP methods (GET, POST, PUT and DELETE).
Use the following link to open Swagger OpenAPI iterative documentation: http://localhost:8080/api/index.html
…
Here comes the example of the HTTP client. It allows to send HTTP requests (GET, POST, PUT and DELETE) and receive HTTP responses.
…
Here comes the example of the HTTPS cache server. It allows to manipulate cache data with HTTP methods (GET, POST, PUT and DELETE) with secured transport protocol.
Use the following link to open Swagger OpenAPI iterative documentation: https://localhost:8443/api/index.html
…
Here comes the example of the HTTPS client. It allows to send HTTP requests (GET, POST, PUT and DELETE) and receive HTTP responses with secured transport protocol.
…
Here comes the example of the WebSocket chat server. It handles multiple WebSocket client sessions and multicast received message from any session to all ones. Also it is possible to send admin message directly from the server.
Use the following link to open WebSocket chat server example: http://localhost:8080/chat/index.html
…
Here comes the example of the WebSocket chat client. It connects to the WebSocket chat server and allows to send message to it and receive new messages.
…
Here comes the example of the WebSocket secure chat server. It handles multiple WebSocket secure client sessions and multicast received message from any session to all ones. Also it is possible to send admin message directly from the server.
This example is very similar to the WebSocket one except the code that prepares WebSocket secure context and handshake handler.
Use the following link to open WebSocket secure chat server example: https://localhost:8443/chat/index.html
…
Here comes the example of the WebSocket secure chat client. It connects to the WebSocket secure chat server and allows to send message to it and receive new messages.
This example is very similar to the WebSocket one except the code that prepares WebSocket secure context and handshake handler.
…
Here comes several communication scenarios with timing measurements.
Benchmark environment is the following:
CPU architecutre: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
CPU logical cores: 8
CPU physical cores: 4
CPU clock speed: 3.998 GHz
CPU Hyper-Threading: enabled
RAM total: 31.962 GiB
RAM free: 24.011 GiB
OS version: Microsoft Windows 8 Enterprise Edition (build 9200), 64-bit
OS bits: 64-bit
Process bits: 64-bit
Process configuaraion: release
This scenario sends lots of messages from several clients to a server. The server responses to each message and resend the similar response to the client. The benchmark measures total round-trip time to send all messages and receive all responses, messages & data throughput, count of errors.
Server address: 127.0.0.1
Server port: 1111
Working clients: 1
Working messages: 1000
Message size: 32
Seconds to benchmarking: 10
Errors: 0
Total time: 10.024 s
Total data: 2.831 GiB
Total messages: 94369133
Data throughput: 287.299 MiB/s
Message latency: 106 ns
Message throughput: 9413997 ms
暂无开放 Issues,或尚未同步最近议题。