Toemsel / Network
Licence: lgpl-3.0
C# Network Library
Stars: ✭ 237
Projects that are alternatives of or similar to Network
Laravel S
LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.
Stars: ✭ 3,479 (+1367.93%)
Mutual labels: async, tcp, udp
Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+1764.98%)
Mutual labels: network, tcp, udp
Computer Networking A Top Down Approach Notes
《计算机网络-自顶向下方法(原书第6版)》编程作业,Wireshark实验文档的翻译和解答。
Stars: ✭ 3,890 (+1541.35%)
Mutual labels: network, tcp, udp
Parallec
Fast Parallel Async HTTP/SSH/TCP/UDP/Ping Client Java Library. Aggregate 100,000 APIs & send anywhere in 20 lines of code. Ping/HTTP Calls 8000 servers in 12 seconds. (Akka) www.parallec.io
Stars: ✭ 777 (+227.85%)
Mutual labels: async, tcp, udp
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (-8.86%)
Mutual labels: network, tcp, udp
Pjon
PJON (Padded Jittering Operative Network) is an experimental, arduino-compatible, multi-master, multi-media network protocol.
Stars: ✭ 2,615 (+1003.38%)
Mutual labels: network, tcp, udp
Message Io
Event-driven message library for building network applications easy and fast.
Stars: ✭ 321 (+35.44%)
Mutual labels: network, tcp, udp
Pytcp
PyTCP is an attempt to create fully functional TCP/IP stack in Python. It supports TCP stream based transport with reliable packet delivery based on sliding window mechanism and basic congestion control. It also supports IPv6/ICMPv6 protocols with SLAAC address configuration. It operates as user space program attached to Linux TAP interface. As of today stack is able to send and receive traffic over Internet using IPv4 and IPv6 default gateways for routing. Since goal of this project is purely educational (at least at this point) the clarity of code is preferred over its efficiency. For the same reason security features are not being implemented just yet unless they are integral part of TCP/IP suite protocols specification.
Stars: ✭ 65 (-72.57%)
Mutual labels: network, tcp, udp
Socket
Non-blocking socket and TLS functionality for PHP based on Amp.
Stars: ✭ 122 (-48.52%)
Mutual labels: async, tcp, udp
Netlink
Socket and Networking Library using msgpack.org[C++11]
Stars: ✭ 197 (-16.88%)
Mutual labels: tcp, udp
Zserver4d
ZServer4D 是一套从商业项目剥离而出的云服务器中间件,可以承载百万级的分布式负载服务,并且支持IoT及内网穿透
Stars: ✭ 199 (-16.03%)
Mutual labels: network, tcp
Computer Networking
Free resources for a self-taught education in Computer Networking
Stars: ✭ 201 (-15.19%)
Mutual labels: tcp, udp
Qtswissarmyknife
QSAK (Qt Swiss Army Knife) is a multi-functional, cross-platform debugging tool based on Qt.
Stars: ✭ 196 (-17.3%)
Mutual labels: tcp, udp
Asio2
Header only c++ network library, based on asio,support tcp,udp,http,websocket,rpc,ssl,icmp,serial_port.
Stars: ✭ 202 (-14.77%)
Mutual labels: tcp, udp
Frpc Android
Android,安卓版frpc,一个快速反向代理,可帮助您将NAT或防火墙后面的本地服务器暴露给Internet。
Stars: ✭ 205 (-13.5%)
Mutual labels: tcp, udp
C# Network Library
Tutorials https://www.indie-dev.at/overview-en/
Downloads http://www.indie-dev.at/?page_id=480
Licence http://www.indie-dev.at/?page_id=525
Documentation http://www.indie-dev.at/?page_id=476
NuGet https://www.nuget.org/packages/Network/
Chat: https://discordapp.com/invite/tgAzGby
Continuous Integration
Build | Architecture | Framework Target | Badge |
---|---|---|---|
Debug | x86 | NET50 | |
Release | x86 | NET50 | |
Debug | x86 | NET46 | |
Release | x86 | NET46 | |
Debug | x86 | standard2.0 | |
Release | x86 | standard2.0 |
Badges
Service | Description | Badge |
---|---|---|
CodeFactor | Code Quality | |
NuGet | Download Count | |
NuGet | Current Version | |
Discord | Chat-Room |
Supported Frameworks
- .NET Framework >= 5.0
- .NET Framework >= 4.6 && <= 4.8
- .NET Core >= 2.0
- Mono >= 5.4
- Xamarin.iOS >= 10.14
- Xamarin.MAC >= 3.8
- Xamarin.Android >= 8.0
- UWP >= 10.0.16299
Features in a nutshell
- TCP communication
- UDP communication
- Bluetooth communication *
- Factories to ensure the most easy setup
- Server and Client Wrappers (Auto-Reconnect, Auto-Join)
- Object oriented. Don't worry about bits and bytes. Send and receive objects
- Optional RSA encryption for TCP and UDP
- Use lambdas, delegates or even async operations to send and receive objects
- Useful helpers to quickly send small information, without creating an object
- Logging for debugging or traffic inspection
- No magic numbers, identifiers or configurations required
- Very fast and relieable (6-10ms RTT)
- Highly customizable
- OpenSource and Free to use
'*' Bluetooth support only for .NET 4.6 - 4.8
Donations
- LTC: LYSaNyRArm1jQdAxYXf7GDFSCuoGnVSVSf
- TRX: TVUiQD8LpKScXv2TMxYb7c2bKA2Xdn8ayn
- ETH: 0xa1249ae140e775d75dd1e96b366cf605264c3f46
- BTC: 15C8ats3mqKB9F86cZVcL6BcFGNfTLDpM6
- XRP: rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh
Example Client
public void Demo()
{
ConnectionResult connectionResult = ConnectionResult.TCPConnectionNotAlive;
//1. Establish a connection to the server.
TcpConnection tcpConnection = ConnectionFactory.CreateTcpConnection("127.0.0.1", 1234, out connectionResult);
//2. Register what happens if we get a connection
if(connectionResult == ConnectionResult.Connected)
{
Console.WriteLine($"{tcpConnection.ToString()} Connection established");
//3. Send a raw data packet request.
tcpConnection.SendRawData(RawDataConverter.FromUTF8String("HelloWorld", "Hello, this is the RawDataExample!"));
tcpConnection.SendRawData(RawDataConverter.FromBoolean("BoolValue", true));
tcpConnection.SendRawData(RawDataConverter.FromBoolean("BoolValue", false));
tcpConnection.SendRawData(RawDataConverter.FromDouble("DoubleValue", 32.99311325d));
//4. Send a raw data packet request without any helper class
tcpConnection.SendRawData("HelloWorld", Encoding.UTF8.GetBytes("Hello, this is the RawDataExample!"));
tcpConnection.SendRawData("BoolValue", BitConverter.GetBytes(true));
tcpConnection.SendRawData("BoolValue", BitConverter.GetBytes(false));
tcpConnection.SendRawData("DoubleValue", BitConverter.GetBytes(32.99311325d));
}
}
Example Server
public void Demo()
{
//1. Start listen on a port
serverConnectionContainer = ConnectionFactory.CreateServerConnectionContainer(1234, false);
//2. Apply optional settings.
#region Optional settings
serverConnectionContainer.ConnectionLost += (a, b, c) => Console.WriteLine($"{serverConnectionContainer.Count} {b.ToString()} Connection lost {a.IPRemoteEndPoint.Port}. Reason {c.ToString()}");
serverConnectionContainer.ConnectionEstablished += connectionEstablished;
serverConnectionContainer.AllowBluetoothConnections = true;
serverConnectionContainer.AllowUDPConnections = true;
serverConnectionContainer.UDPConnectionLimit = 2;
#endregion Optional settings
//Call start here, because we had to enable the bluetooth property at first.
serverConnectionContainer.Start();
}
/// <summary>
/// We got a connection.
/// </summary>
/// <param name="connection">The connection we got. (TCP or UDP)</param>
private void connectionEstablished(Connection connection, ConnectionType type)
{
Console.WriteLine($"{serverConnectionContainer.Count} {connection.GetType()} connected on port {connection.IPRemoteEndPoint.Port}");
//3. Register packet listeners.
connection.RegisterRawDataHandler("HelloWorld", (rawData, con) => Console.WriteLine($"RawDataPacket received. Data: {rawData.ToUTF8String()}"));
connection.RegisterRawDataHandler("BoolValue", (rawData, con) => Console.WriteLine($"RawDataPacket received. Data: {rawData.ToBoolean()}"));
connection.RegisterRawDataHandler("DoubleValue", (rawData, con) => Console.WriteLine($"RawDataPacket received. Data: {rawData.ToDouble()}"));
}

Async Example
public async void Demo()
{
//1. Establish a connection to the server.
ClientConnectionContainer container = ConnectionFactory.CreateClientConnectionContainer("127.0.0.1", 1234);
//2. Register what happens if we get a connection
container.ConnectionEstablished += async (connection, type) =>
{
Console.WriteLine($"{type.ToString()} Connection established");
//3. Send a request packet async and directly receive an answer.
CalculationResponse response = await connection.SendAsync<CalculationResponse>(new CalculationRequest(10, 10));
Console.WriteLine($"Answer received {response.Result}");
};
}
Delegate Example
private ClientConnectionContainer container;
public void Demo()
{
//1. Establish a connection to the server.
container = ConnectionFactory.CreateClientConnectionContainer("127.0.0.1", 1234);
//2. Register what happens if we get a connection
container.ConnectionEstablished += connectionEstablished;
}
private void connectionEstablished(Connection connection, ConnectionType type)
{
Console.WriteLine($"{type.ToString()} Connection established");
//3. Register what happens if we receive a packet of type "CalculationResponse"
container.RegisterPacketHandler<CalculationResponse>(calculationResponseReceived, this);
//4. Send a calculation request.
connection.Send(new CalculationRequest(10, 10), this);
}
private void calculationResponseReceived(CalculationResponse response, Connection connection)
{
//5. CalculationResponse received.
Console.WriteLine($"Answer received {response.Result}");
}
Lambda Example
public void Demo()
{
//1. Establish a connection to the server.
ClientConnectionContainer container = ConnectionFactory.CreateClientConnectionContainer("127.0.0.1", 1234);
//2. Register what happens if we get a connection
container.ConnectionEstablished += (connection, type) =>
{
Console.WriteLine($"{type.ToString()} Connection established");
//3. Register what happens if we receive a packet of type "CalculationResponse"
connection.RegisterPacketHandler<CalculationResponse>((response, con) => Console.WriteLine($"Answer received {response.Result}"), this);
//4. Send a calculation request.
connection.Send(new CalculationRequest(10, 10), this);
};
}
Bluetooth Example
public async void Demo()
{
//1. Get the clients in range.
DeviceInfo[] devicesInRange = await ConnectionFactory.GetBluetoothDevicesAsync();
if(devicesInRange.Length <= 0) return; //We need at least one bluetooth connection to deal with :)
//2. Create a new instance of the bluetoothConnection with the factory.
Tuple<ConnectionResult, BluetoothConnection> bluetoothConnection = await ConnectionFactory.CreateBluetoothConnectionAsync(devicesInRange[0]);
if(bluetoothConnection.Item1 != ConnectionResult.Connected) return; //We were not able to connect to the server.
//3. Register what happens if we receive a packet of type "CalculationResponse"
bluetoothConnection.Item2.RegisterPacketHandler<CalculationResponse>((response, con) => Console.WriteLine($"Answer received {response.Result}"), this);
//4. Send a calculation request.
bluetoothConnection.Item2.Send(new CalculationRequest(10, 10), this);
}
RSA Example
public async void Demo()
{
//1. Establish a connection.
ClientConnectionContainer container = ConnectionFactory.CreateSecureClientConnectionContainer("127.0.0.1", 1234);
//2. Register what happens if we get a connection
container.ConnectionEstablished += (connection, type) =>
{
Console.WriteLine($"{type.ToString()} Connection established");
//3. Register what happens if we receive a packet of type "CalculationResponse"
connection.RegisterPacketHandler<CalculationResponse>((response, con) => Console.WriteLine($"Answer received {response.Result}"), this);
//4. Send a calculation request.
connection.Send(new CalculationRequest(10, 10), this);
};
}
Logging

Logging with RSA

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].