All Projects → Abc-Arbitrage → Zerio

Abc-Arbitrage / Zerio

Licence: mit
Basic performance-oriented TCP client/server messaging C# API based on Windows Registered I/O (RIO)

Labels

Projects that are alternatives of or similar to Zerio

Vue Network
Render a Vue component to indicate network status.
Stars: ✭ 42 (-22.22%)
Mutual labels:  network
Rats Search
BitTorrent P2P multi-platform search engine for Desktop and Web servers with integrated torrent client.
Stars: ✭ 1,037 (+1820.37%)
Mutual labels:  network
V2ray Core
A platform for building proxies to bypass network restrictions.
Stars: ✭ 13,438 (+24785.19%)
Mutual labels:  network
Eventd
A simple daemon to track remote or local events and do actions the user wants to
Stars: ✭ 43 (-20.37%)
Mutual labels:  network
Wheel
关于net nio os cache db rpc json web http udp tcp mq 等多个小工具的自定义实现
Stars: ✭ 45 (-16.67%)
Mutual labels:  network
Pyrwr
Python Implementation for Random Walk with Restart (RWR)
Stars: ✭ 48 (-11.11%)
Mutual labels:  network
Dknetworking
基于 AFNetworking + YYCache 的二次封装,支持缓存策略的网络请求框架
Stars: ✭ 41 (-24.07%)
Mutual labels:  network
Hreq
A type dependent highlevel HTTP client library inspired by servant-client.
Stars: ✭ 53 (-1.85%)
Mutual labels:  network
Nipe
An engine to make Tor network your default gateway
Stars: ✭ 1,032 (+1811.11%)
Mutual labels:  network
Ready For Tech Interview
💻 신입 개발자로서 준비를 하기 위해 지식을 정리하는 공간 👨‍💻
Stars: ✭ 1,035 (+1816.67%)
Mutual labels:  network
Aplay
A Better(Maybe) iOS Audio Stream、Cache、Play Framework
Stars: ✭ 44 (-18.52%)
Mutual labels:  network
Oh My Request
🔮 simple request library by java8
Stars: ✭ 44 (-18.52%)
Mutual labels:  network
Pnet
High level Java network library
Stars: ✭ 49 (-9.26%)
Mutual labels:  network
Gasmodels.jl
A Julia/JuMP Package for Gas Network Optimization
Stars: ✭ 43 (-20.37%)
Mutual labels:  network
Opensvp
Opensvp is a security tool implementing "attacks" to be able to test the resistance of firewall to protocol level attack.
Stars: ✭ 50 (-7.41%)
Mutual labels:  network
G6
♾ A Graph Visualization Framework in JavaScript
Stars: ✭ 8,490 (+15622.22%)
Mutual labels:  network
Llama
Library for testing and measuring network loss and latency between distributed endpoints.
Stars: ✭ 47 (-12.96%)
Mutual labels:  network
Arp Validator
Security Tool to detect arp poisoning attacks
Stars: ✭ 54 (+0%)
Mutual labels:  network
Pythem
pentest framework
Stars: ✭ 1,060 (+1862.96%)
Mutual labels:  network
React Native Netinfo
React Native Network Info API for Android & iOS
Stars: ✭ 1,049 (+1842.59%)
Mutual labels:  network

Zerio

Build Status

Overview

Zerio is a small experimental project which aims to provide a very basic TCP client/server messaging API based on Windows Registered I/O (RIO). The implementation is in C# (.NET) and is performance-oriented. The initial design of the project allows a bidirectionnal messaging communication between a server and several clients without generating any garbage (zero allocation programming).

Disclaimer

Zerio is very much a work in progress and more a proof of concept than anything else at this stage. It is not production ready yet.

Server

To create a server you just have to do the following:

using (var server = new ZerioServer(48654))
{
    server.Start("server");
    
    // server is ready to be used
    // ...
    
    server.Stop();
}

Client

This is how you create a client and connect to a server.

using (var client = new ZerioClient(new IPEndPoint(IPAddress.Loopback, 48654))
{
    client.Start("client");

    // client is ready to be used
    // ...
}

Sending messages

Using the client to send a message is dead simple: you just have to pass a ReadOnlySpan<byte> to the Send method:

var message = Encoding.ASCII.GetBytes("oui")
client.Send(message);

From the server, it's very similar. The only difference is that you will need the id of the client you want to send the message to. This id can be retrieved during the client connection:

server.ClientConnected += OnClientConnected;

// ...

private static void OnClientConnected(string peerId)
{
}

Then you simply have to send a message to it:

var message = Encoding.ASCII.GetBytes("quoi")
server.Send(peerId, message);

Internals

Zerio Zero allocation

Both ZerioClient and ZerioServer can be used to communicate with each other without allocating any .NET object instances on the heap, thus avoiding any garbage collection to be triggered. However, the connection phase between a client and a server is not garbage free.

Design overview

Design overview

Sending path

Sending path

Receiving path

Receiving path

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].