Skip to content

EmreBugday99/NetSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetSync

A fully dynamic, high performant networking library for games and applications.

Dynamic? How?

NetSync has a really dynamic protocol implementation process built in. All you have to do is override the TransportBase class and viola! Check AsyncTcp implementation for example.
Each NetworkClient and NetworkServer can use any protocol implementation they want.

No Server/Client limit

A process/application can host as many servers and clients as you want.
A single executable can contain dozens of servers and clients.
This is also due to the dynamic nature of NetSync.

Server And Client Inside One Code Base

You write your own server and client logic inside one project as they share the same code base.
This increases your producitivity a lot compared to traditional networking applications where you seperate the two completely.
This is yet again was possible to the 'highly dynamic' design principle I have followed.

Asynchronous Networking

NetSync focuses on scalability. You can't scale well if you run thousands of connections inside a single thread. You just simply can't. That's why I went %100 asynchronous with AsynTcp Transport.
You still can create your own transports and make it synchronous.
I created this library for my specific needs and scalability comes first amongst those needs.
Due to the dynamic nature of the library you can customize it however you want.
Transports simply functions like plugins. You plug your own transport and viola, you are ready to go.

Handler Queue System

If your application has a complex multi-threaded architecture or if you simply need your application to run on a single thread, you can use the queue execution system.
Any handler that is marked as queued will not execute right away when they get received. They will be stored in memory and wait for execution. When you call ExecuteQueuedHandlers method it will execute the entire queue from the thread you specifically called the method. This ensures thread safety amongst your application.
You can get more information from this link

Network Synced Objects

You can create synced classes during runtime. Synced classes will get constructed/instantiated on all clients during runtime.
You can also mark your classes/objects as late comer synced. This will ensure them to be also instantiated on clients that connected after the networked class got created.
For safety reasons this feature can only be executed from server.
You can get more information from this link

Multi Channel Support

NetSync supports multi channel system integration. Channels are a great way to categorize your packets according to your needs.
Maybe you want to use channel specifically for encrypted transmission? You can easily integrate this into your Transport with channels.
By default you use the channel 1 for transmission. You can easily change that with specifying a new channel when sending a packet / registering a handler.

WARNING: YOU SHOULD NEVER USE CHANNEL 0 AS IT IS RESERVED FOR NETSYNC'S INTERNAL PROTOCOL!


About

NetSync is an easy to modify and scalable networking library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages