You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-28Lines changed: 32 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,35 @@
1
1
# Standard Network Library
2
-
High Performance, easy to use, network library supporting 16k+ concurrent clients.
2
+
High Performance, easy to use network library supporting 16k+ concurrent clients.
3
3
Provides infrastructure for high throughput message passing, P2P, Nat Traversal, Reliable Udp.
4
-
</br>This repository consist one main assembly and several serialization spesific implemtation assemblies.
5
-
## Main Assembly
4
+
</br>This repository consist one main core assembly and several serialization spesific implementation assemblies.
5
+
## Core Network Liblary
6
6
Network Library, which is the core of entire network library. It has all the logic associated with the network system and sub systems, starting from raw bytes to abstractions such as P2P lobbies. It provides generic templates to be used with any serialization methodology.
7
7
8
8
### Core Models
9
-
Plug&Play models, working with raw bytes.
10
-
-```Tcp Server/Client model``` with dynamic buffering and queuing sub systems, bytes can come fragmented like regular sockets.
11
-
-```Tcp Byte Message Server/Client```model where bytes are sent with 4 byte lenght header. It ensure atomic message delivery without fragmentation.
12
-
-```Udp Server/Client```models optimised for performance.
13
-
-```Reliable Udp Client/Server```models where modern TCP protocol is implemented over Udp.
9
+
Plug&Play high performance models, working with raw bytes.
10
+
-```Tcp Server/Client model``` with dynamic buffering and queueing sub systems, bytes can come fragmented like regular sockets.
11
+
-```Tcp Byte Message Server/Client``` where bytes are sent with 4 byte lenght header. It ensure atomic message delivery without fragmentation.
12
+
-```Udp Server/Client```standard udp with optimised for performance.
13
+
-```Reliable Udp Client/Server``` where modern TCP protocol is implemented over Udp.
14
14
- Secure variants of all of the above(SSL with TLS for Tcp, Symetric Key AES for Udp).
15
15
16
16
### Templates
17
-
Involves generic clases which works with any serialization protocol.
18
-
-```Generic Message Server/Client```model which send and receives serialized messages atomically.
19
-
-```Generic MessageProtocol Server/client```model, similar to above, but with addition of "MessageEnvelope" carrier class, used as header/metadata.
20
-
-```P2P Relay Client/Server```Model where Peers(Clients) discover each other via Relay server, can use Udp/Tcp to communicate. Supports Udp Holepunch.
21
-
-```P2P Room/Lobby Server/Client```, extention of Relay model where peers can define a room, similar to game matchmaking servers.
17
+
Involves generic models which can work with any serialization protocol.
18
+
-```Generic Message Server/Client```designed to send and receive serialized messages atomically.
19
+
-```Generic MessageProtocol Server/client``` similar to above, but with addition of "MessageEnvelope" carrier class, used as header/metadata.
20
+
-```P2P Relay Client/Server``` where Peers(Clients) discover each other via Relay server, can use Udp/Rudp/Tcp to communicate. Supports Udp Holepunch.
21
+
-```P2P Room/Lobby Server/Client``` extention of Relay model where peers can define a room, similar to game matchmaking servers.
22
22
23
23
### Low Level Features
24
24
25
25
#### Advanced Memory Management
26
-
- Library implements "Shared Thread Local Memory Pool", where all byte arrays and the stream backing buffers are rented from. Memory is weak referenced. Pool provides minimum GC cycles and automatically trims on system memory pressure.
27
-
- As an example, RelayServer can relay 21 Gigabytes/s Udp traffic using 36 mb process memory with 0 GC Collects.
26
+
- Library implements "Shared Thread Local Memory Pool", where all byte arrays and the stream backing buffers are rented from. Memory is weak referenced. Pool allows minimum number GC cycles and automatically trims on system memory pressure.
27
+
- As an example, RelayServer can relay 21 Gigabyte/s Udp traffic using 36 mb process memory with 0 GC Collects.
28
28
29
29
#### Message Buffering
30
-
-Since the System calls for socket operations are rather expensive, on Tcp models a buffering/queueing system is implemented. This system is active only during high load.
30
+
- Tcp models a buffering/queueing system is implemented. This system is activated only during high load.
31
31
In a nutsell, if the socket is busy sending, next messages are collected and stiched together and sent as batch when the socket becomes available again. Its like Naggle, but without sacrificing the fast sends on moderate traffic.
32
-
- This improves the throughput of small messages quite significantly which will be shown on benchmarks.
32
+
- This improves the throughput of small messages quite significantly as shown on benchmarks.
33
33
34
34
Library is tested with as many clients as OS(Windows) supports (around 16k dynamic ports). Data reliability(includung RUDP) is tested over the internet extensively.
35
35
Nat Traversal Udp holepunching is also tested over the internet with great success.
Ontopofthat3channelsareprovidedfor Rudp. Ch1,Ch2 and Realtime.
322
+
Ontopofthat3independentchannelsareprovidedfor Rudp. Ch1,Ch2 and Realtime.
323
+
Reason for this is if you send a large message like a file from single channel, it will be blocked until message is completely sent. hence subsequent messages has to wait in buffer.
324
+
By having independent channels this issue is avoided.
325
+
322
326
Ch1 and 2 are standard channels with same timeout mechanics of windows TCP implmentation.
323
-
</br> Realtime channel is more sensitive to timeouts and may resend messages "pre-emtively". but resends are much faster so data is delivered reliably with minimum delay.
327
+
</br> Realtime channel is more sensitive to timeouts and may resend messages "pre-emtively". But resends are much faster so data is delivered reliably with minimum delay.
0 commit comments