# SharpOTP **Repository Path**: ihaoqihao/SharpOTP ## Basic Information - **Project Name**: SharpOTP - **Description**: No description available - **Primary Language**: C# - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-12-16 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SharpOTP ```csharp using System; using System.Threading; using System.Threading.Tasks; namespace Tests { class Program { static void Main(string[] args) { System.Threading.ThreadPool.SetMinThreads(30, 30); Do(); Console.ReadLine(); } static public async Task Do() { for (int i = 0; i < 50; i++) { try { Console.WriteLine(await TestServer.Post(i.ToString())); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } } } public sealed class TestServer { static private readonly SharpOTP.Actor _server = SharpOTP.GenServer.Start(); public async Task HandleCall(string message) { if (message == "1") throw new Exception(message); return "hello " + message; } static public Task Post(string str) { return _server.Call(str); } } } ```