2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-06-13 14:38:43 +00:00
This commit is contained in:
2026-06-08 16:15:57 +03:00
parent 8143da2eee
commit 340798a5fa
111 changed files with 20647 additions and 27 deletions
+16
View File
@@ -0,0 +1,16 @@
using Thrift.Server;
using Thrift.Protocol;
using Thrift.Transport.Server;
using Esiur.Tests.RPC.ThriftServer;
var handler = new EchoHandler();
var processor = new Echo.ThriftModel.EchoService.AsyncProcessor(handler);
var port = 5400;
var serverTransport = new TServerSocketTransport(port, new Thrift.TConfiguration());
var server = new TSimpleAsyncServer(processor, serverTransport, new TBinaryProtocol.Factory(), new TBinaryProtocol.Factory(),
LoggingHelper.LogFactory);
Console.WriteLine($"Thrift server listening on port {port}...");
await server.ServeAsync(new CancellationToken());