.Net 高性能网络框架 Griffin.Framework

码农软件 · 软件分类 · 高性能网络开发库 · 2019-09-01 05:58:02

软件介绍

Griffin.Framework 是 .NET 的高性能网络框架。

示例代码:

public class Server{
    private readonly ChannelTcpListener _server;
 
    public Server()
    {
        _server = new ChannelTcpListener();
        _server.MessageReceived += OnMessage;
        _server.ClientConnected += OnClientConnected;
        _server.ClientDisconnected += OnClientDisconnected;
    }
 
    public int LocalPort    {
        get { return _server.LocalPort; }
    }
 
    public void Start()
    {
        _server.Start(IPAddress.Any, 0);
    }
 
    private void OnClientConnected(object sender, ClientConnectedEventArgs e)
    {
        Console.WriteLine("Got connection from client with ip " + e.channel.RemoteEndPoint);
    }
 
    private void OnClientDisconnected(object sender, ClientDisconnectedEventArgs e)
    {
        Console.WriteLine("Disconnected: " + e.Channel.RemoteEndpoint);
    }
 
    private void OnMessage(ITcpChannel channel, object message)
    {
        Console.WriteLine("Server received: " + message);
        channel.Send(Encoding.ASCII.GetBytes("Hello  world"));
    }}

                           

 

griffinframework

benchmark

本文地址:https://www.codercto.com/soft/d/13612.html

Programming in Haskell

Programming in Haskell

Graham Hutton / Cambridge University Press / 2007-1-18 / GBP 34.99

Haskell is one of the leading languages for teaching functional programming, enabling students to write simpler and cleaner code, and to learn how to structure and reason about programs. This introduc......一起来看看 《Programming in Haskell》 这本书的介绍吧!

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具