Some nwbie question - how to integrate Netty into WebApp
olekg
olekg at pbpolsoft.com.pl
Fri Sep 11 11:19:28 EDT 2009
Frederic Bregier wrote:
>
> Hi Olek,
>
> Yes this could be the start for a multiple client requests since there is
> a HttpServerPipelineFactory that gives you the multiple/concurrent access
> capability.
> Of course, other points could be added like thread managment, shutdown
> process, ... Those points could be found in the documentation of Netty or
> through some research in this mailing list.
> Of course, if there are some missing points, just asks ! ;-)
> Cheers,
> Frederic
>
Hello,
I modified the http snoop example but cannot get the functionality of
Comet/Streaming as on Tomcat. I think I need the following :
How to send subsequent chunked data one by one without ending the response ?
In http snoop sample we have :
a) Filling of "responseContent" object with complete response data,
b) ChannelBuffer created :
ChannelBuffer buf = ChannelBuffers.copiedBuffer(responseContent.toString(),
"UTF-8");
c) Sending of the COMPLETE response :
HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1,
HttpResponseStatus.OK);
response.setContent(buf);
[...]
ChannelFuture future = e.getChannel().write(response);
d) Closing the connection
future.addListener(ChannelFutureListener.CLOSE);
I think I need some different approach to write any number of chunks without
closing the connection.
Maybe somebody would be able provide mi with some tip ?
1. How to create and send chunks ?
2. How to have the connection still open ? (In Tomcat NIO handler provides
us with this functionality).
regards Olek
--
View this message in context: http://n2.nabble.com/Some-nwbie-question-how-to-integrate-Netty-into-WebApp-tp3617235p3626430.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list