0

I'm implementing a primitive http server and I have a handler extending SimpleChannelInboundHandler. I have a method that's processing requests and I want to make a delay after processing specific request. How should I implement the pause so that server's behaviour still conforms to standards? I mean, client (browser etc.) should not behave like connection is lost or something like that, but just wait till the necessary amount of time passes.

4

1 に答える 1

1

あなたはただ使うことができます:

ctx.executor().schedule(...)

このようにして、スケジュール呼び出しに渡す Runnable に書き込みを行うことができます。

于 2013-10-24T17:08:32.727 に答える