| | 1 | | // AUTOGENERATED, DO NOT EDIT |
| | 2 | | // Type definitions for server implementations of ports. |
| | 3 | | // package: decentraland.renderer.renderer_services |
| | 4 | | // file: decentraland/renderer/renderer_services/transport.proto |
| | 5 | | using System.Collections.Generic; |
| | 6 | | using System.Threading; |
| | 7 | | using Cysharp.Threading.Tasks; |
| | 8 | | using Google.Protobuf; |
| | 9 | | using rpc_csharp.protocol; |
| | 10 | | using rpc_csharp; |
| | 11 | | namespace Decentraland.Renderer.RendererServices { |
| | 12 | | public interface ITransportService<Context> |
| | 13 | | { |
| | 14 | |
|
| | 15 | | IUniTaskAsyncEnumerable<Payload> OpenTransportStream(IUniTaskAsyncEnumerable<Payload> streamRequest, Context context); |
| | 16 | |
|
| | 17 | | } |
| | 18 | |
|
| | 19 | | public static class TransportServiceCodeGen |
| | 20 | | { |
| | 21 | | public const string ServiceName = "TransportService"; |
| | 22 | |
|
| | 23 | | public static void RegisterService<Context>(RpcServerPort<Context> port, ITransportService<Context> service) |
| | 24 | | { |
| 1 | 25 | | var result = new ServerModuleDefinition<Context>(); |
| | 26 | |
|
| 1 | 27 | | result.bidirectionalStreamDefinition.Add("OpenTransportStream", (IUniTaskAsyncEnumerable<ByteString> payload, Contex |
| | 28 | | return ProtocolHelpers.SerializeMessageEnumerator<Payload>(service.OpenTransportStream( |
| | 29 | | ProtocolHelpers.DeserializeMessageEnumerator<Payload>(payload, s => Payload.Parser.ParseFrom(s)), context)); |
| | 30 | | }); |
| | 31 | |
|
| 1 | 32 | | port.RegisterModule(ServiceName, (port) => UniTask.FromResult(result)); |
| 1 | 33 | | } |
| | 34 | | } |
| | 35 | | } |