Netty <===> NotNetty
Replicator
webakaunt at gmail.com
Fri Oct 14 14:59:46 EDT 2011
Norman, Ioan,
Yes, I read the tutorial, and I am not immediately writing to a channel
once I am connected anyway ( the above are fragments from an overall code
flow ).
The problem was FIREWALL. Once it was fixed, the code started to work as
expected.
Thank you!
On Fri, Oct 14, 2011 at 2:30 AM, ieugen [via Netty Forums and Mailing Lists]
<ml-node+s685743n6891420h19 at n2.nabble.com> wrote:
> 2011/10/14 zx spectrum <[hidden email]<http://user/SendEmail.jtp?type=node&node=6891420&i=0>>:
>
>
> > Is there anything specific that needs to be done when connecting a netty
> > client to a non Netty server ( developed in some other language, etc.. )?
>
> > Besides this:
> > val bootstrap = new ClientBootstrap(
> > new NioClientSocketChannelFactory(
> > Executors.newCachedThreadPool,
> > Executors.newCachedThreadPool ) )
> > bootstrap.setPipelineFactory( new ChannelPipelineFactory {
> > def getPipeline = {
> > Channels.pipeline( channelHandlers.toArray : _* )
> > }
> > } )
> > bootstrap.setOption( "remoteAddress", new InetSocketAddress( host,
> port
> > ) )
> > val channel = bootstrap.connect.getChannel // <= this succeeds
> > clientChannel.write( ChannelBuffers.wrappedBuffer( message ) )
> > It throws a NotYetConnected exception.
> > If I do "clientChannel.write( ChannelBuffers.wrappedBuffer( message ),
> new
> > InetSocketAddress( host, port ) )" instead, it throws a
> > "java.net.ConnectException: connection timed out"
>
>
> Netty is asynchronous and events based. This means that connect and
> write functions return immediately you should catch the channel
> Connected event and do your logic there.
>
> Have you gone over the tutorial?
>
> --
> Ioan Eugen Stan
> http://ieugen.blogspot.com/
>
>
> _______________________________________________
> netty-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=6891420&i=1>
> https://lists.jboss.org/mailman/listinfo/netty-users
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-NotNetty-tp6890537p6891420.html
> To unsubscribe from Netty <===> NotNetty, click here<http://netty-forums-and-mailing-lists.685743.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6890537&code=d2ViYWthdW50QGdtYWlsLmNvbXw2ODkwNTM3fC0xODA0ODQ0MTcz>.
>
>
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-NotNetty-tp6890537p6893692.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list