https://github.com/imvexed/notlitecode
Remote Encrypted Procedure Calling for .Net & .Net Core
https://github.com/imvexed/notlitecode
cross-platform encryption high-performance netcore rmi rpc
Last synced: about 1 month ago
JSON representation
Remote Encrypted Procedure Calling for .Net & .Net Core
- Host: GitHub
- URL: https://github.com/imvexed/notlitecode
- Owner: ImVexed
- License: unlicense
- Created: 2016-09-15T06:53:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-01T01:01:29.000Z (over 6 years ago)
- Last Synced: 2025-04-12T22:44:41.584Z (about 1 month ago)
- Topics: cross-platform, encryption, high-performance, netcore, rmi, rpc
- Language: C#
- Homepage:
- Size: 164 KB
- Stars: 16
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://ci.appveyor.com/project/ImVexed/notlitecode?branch=master)
[](https://www.codefactor.io/repository/github/imvexed/notlitecode)
[](https://github.com/ImVexed/NotLiteCode/blob/master/LICENSE)
[](https://www.nuget.org/packages/NotLiteCode)# NotLiteCode
A simple, hackable, remote code hosting platform.## What is?
NLC (Not Lite Code) is a simplified version of LiteCode by *DragonHunter*, which provides native RPC and other useful features without any external dependencies.## How does this differ from traditional RPC/RMI?
Traditionally RPC/RMI implements a stub interface and is tightly coupled. NLC however can function without a stub interface by using `BinaryFormatter` to serialize & deserialize objects on the fly at runtime allowing it to be loosly coupled. NLC also allows communication over `SSLStream` for security.## How is state handled?
NLC creates a unique instance for every client allowing you to keep stateful data alongside their functions in the `SharedClass`.## How is concurrency handled?
As of 1.4 NLC's networking core is now asynchronous and will invoke calls in a new Task once the data is received. Thus any synchronization must either be ensured in the client invoking the methods or inside the SharedClass functions themselves.## Sample Implementation
### Server Code:
SharedClass.cs
```C#
[NLCCall("MagicNumber")]
public bool IsMagicNumber(int number)
{
return number == 7;
}
```
Program.cs
```C#
server = new Server();
server.Start();
```
### Client Code:
Program.cs
```C#
public static async Task IsMagicNumber(int number) =>
await client.RemoteCall("MagicNumber", number);
client = new Client();client.Connect("localhost", 1337);
Console.WriteLine(await IsMagicNumber(-10)); // False
Console.WriteLine(await IsMagicNumber(7)); // True
```
## Sample Outputs![]()
## Original
[LiteCode](https://gitlab.com/Dergan/LiteCode) by *DragonHunter*