samples.echo question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

samples.echo question

yangjun2
EchoServer.java

// binding transport to start listen on certain host and port
   transport.bind(HOST, PORT);

   transport.configureStandalone(true);

 // start the transport
   transport.start();


   transport.configureStandalone(true);  // when add this line , EchoServer could not receive message?

   

   
   yangjun
   Best Regards.
   

 
Best Regards,
Young
Reply | Threaded
Open this post in threaded view
|

Re: samples.echo question

oleksiys
Administrator

> // binding transport to start listen on certain host and port
>     transport.bind(HOST, PORT);
>
>     transport.configureStandalone(true);
>
>   // start the transport
>     transport.start();
>
>
>     transport.configureStandalone(true);  // when add this line , EchoServer
> could not receive message?
Right, we use standalone mode just in our tests, we wouldn't advice to
use it in real-world apps :)

When you set it - it actually means you want to work with
Connection/Transport in socket-like mode (no FilterChain etc).
Please take a look at this test [1], it's what standalone mode about.

WBR,
Alexey.

[1]
http://java.net/projects/grizzly/sources/git/content/modules/grizzly/src/test/java/org/glassfish/grizzly/StandaloneTest.java


>
>
>
>     yangjun
>     Best Regards.
>
>
>
>
> --
> View this message in context: http://grizzly.1045725.n5.nabble.com/samples-echo-question-tp4475386p4475386.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.