mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-06-13 14:38:43 +00:00
RPC Test
This commit is contained in:
@@ -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());
|
||||
Reference in New Issue
Block a user