dev@grizzly.java.net

Re: Testing TCP blocking client sends multiple packets with Grizzly 2.0.0_M3

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Mon, 31 Aug 2009 11:09:54 +0200

Hi,

> For Grizzly 1_x_x releases, in grizzly-framework(bundle or jar),
> there is MultiREadTheadTest.java with method of
> testSeveralPackets() utilizes TCPIOClient to create blocking TCP
> clients to test sending multiple packets to Grizzly as echo server.
Right.


> In Gizzly 2.0.0_M3, TCPNIOTransportTest.java has a test case of
> testServeralPacketsEcho contains a line as
> transport.configureBlocking(true). Can I assume
> “transport.configureBlocking(true)” will create TCP blocking clients
> same as TCPIOClient in Grizzly 1_X_X to send multiple packets with
> Grizzly 2.0.0_M3?
Not same. TCPNIOClient in Grizzly 1.9.x uses blocking Sockets API.
When you use TCPNIOTransport in blocking mode - we still use NIO API,
but I/O operations like read/write are executed in blocking manner.
You can think about this as blocking behavior over NIO API.

> Also Grizzly 2.0.0’s package com.sun.grizzly.sample.echo, is
> EchoClient.java a TCP blocking client or no-blocking client?
Non-blocking.

WBR,
Alexey.

>
>
> Ming Qin
> Cell Phone 858-353-2839