• [^] # Re: Programmation asynchrone

    Posté par . En réponse à la dépêche Node.js passe en version 0.6.0 et arrive sous Windows. Évalué à 1.

    Ca a l'air simple!

    // Configure the client.
    62 ClientBootstrap bootstrap = new ClientBootstrap(
    63 new NioClientSocketChannelFactory(
    64 Executors.newCachedThreadPool(),
    65 Executors.newCachedThreadPool()));
    66 
    67 // Set up the pipeline factory.
    68 bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
    69 public ChannelPipeline getPipeline() throws Exception {
    70 return Channels.pipeline(
    71 new EchoClientHandler(firstMessageSize));
    72 }
    73 });
    74