public async Task Start(IPAddress ip_address, int port, string orleansClientConfigFile, SessionHandlerFactory factory) { bootstrap .Group(bossGroup, workerGroup) .Channel <TcpServerSocketChannel>() .Option(ChannelOption.SoBacklog, 100) .Handler(new LoggingHandler(LogLevel.INFO)) .ChildHandler(new ActionChannelInitializer <ISocketChannel>(channel => { IChannelPipeline pipeline = channel.Pipeline; pipeline.AddLast(new LengthFieldPrepender( ByteOrder.LittleEndian, 2, 0, false)); pipeline.AddLast(new LengthFieldBasedFrameDecoder( ByteOrder.LittleEndian, ushort.MaxValue, 0, 2, 0, 2, true)); pipeline.AddLast(new GatewayChannelHandler(factory)); })); bootstrapChannel = await bootstrap.BindAsync(ip_address, port); GrainClient.Initialize(orleansClientConfigFile); }
public GatewayChannelHandler(SessionHandlerFactory factory) { this.factory = factory; }
public Task Start(IPAddress ip_address, int port, string orleansClientConfigFile, SessionHandlerFactory factory) { return(this.gatewayRunner.Start(ip_address, port, orleansClientConfigFile, factory)); }