On Wed, Jul 11, 2018 at 5:20 PM Gary Gregory <[email protected]> wrote:

> On Wed, Jul 11, 2018 at 3:22 PM Oleg Kalnichevski <[email protected]>
> wrote:
>
>> On Wed, 2018-07-11 at 10:14 -0600, Gary Gregory wrote:
>> > In version 4 I have:
>> >
>> >         server = ServerBootstrap.bootstrap()
>> >                 .setListenerPort(port)
>> >                 .setServerInfo("My custom string")
>> >          ...
>> >
>> > How do I do "setServerInfo" in version 5?
>> >
>> > Gary
>>
>> HttpServer server = ServerBootstrap.bootstrap()
>>   .setListenerPort(port)
>>   .setHttpProcessor(HttpProcessors.server("my-server-info"))
>>   .create();
>>
>> This should be equivalent to the old code.
>>
>
> Thanks Oleg. How about .setIOReactorConfig(config) ?
>

This is my fully config:

        server = ServerBootstrap.bootstrap()
                .setListenerPort(port)

.setHttpProcessor(HttpProcessors.server(NHttpFileServerTestRule.class.getCanonicalName()
+ "/1.1"))
                .setIOReactorConfig(config)
                .setExceptionLogger(ExceptionLogger.STD_ERR)
                .registerHandler("*", new CustomHttpTestHandler())
                .create();

Where config is:

        final IOReactorConfig config = IOReactorConfig.custom()
                .setSoTimeout(Timeout.ofSeconds(15))
                .setTcpNoDelay(true)
                .build();

Thank you,
Gary

>
> Gary
>
>
>>
>> Oleg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>

Reply via email to