@trustin,

Can you share the sample pipeline structure?

On Wednesday, January 21, 2015 at 3:22:19 PM UTC+6, Trustin Lee wrote:
>
> You could prepare three `ReadTimeoutHandler` for this.
>  
> The first one is to time-out the connection when you are unsure if it's a 
> plain HTTP connection or a Web Socket connection.
> The second one is to time-out the plain HTTP connection.
> The third one is to time-out the Web Socket connection.
>  
> Presumably, the first one and the second one might have the same timeout. 
> Then you need only two ReadTimeoutHandlers.
>  
> Your pipeline starts with the first timeout handler, because you don't 
> know which the current connection is.
>  
> When the client sends an HTTP request, you can determine if the current 
> connection is Web Socket or not.
>  
> If the current connection is plain HTTP, you can replace the first timeout 
> handler with the second timeout handler.  If the first one and the second 
> one are same, then of course you don't need to do anything.
>  
> If the current connection is Web Socket, you can replace the first timeout 
> handler with the third timeout handler.
>  
> Because a Web Socket connection can be created in the middle of the plain 
> HTTP keep-alive connection, you might end up replacing the timeout handlers 
> twice. (first -> second -> third)
>  
> Please note you don't really need this sort of dynamic pipeline 
> manipulation if you write your own timeout handler, which applies dynamic 
> timeout based on the current HTTP message being processed, and it should be 
> way more efficient.
>  
> HTH,
> T
>  
> --
> https://twitter.com/trustin
> https://twitter.com/trustin_ko
> https://twitter.com/netty_project
>  
>  
> On Tue, Dec 16, 2014, at 01:13 PM, john mayer wrote:
>
> Hi,
>     i  am working on websocket server. i have found an exmple 
> https://github.com/netty/netty/blob/master/example/src/main/java/io/netty/example/http/websocketx/server/WebSocketServer.java.
>  
> I am trying using same handler for http polling too. i want to apply 
> readtimeout handler only for websocket connection not for http connection. 
> how can i do that?
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Netty discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/netty/efd33c35-efb0-49d4-898d-2eacd8fe7647%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/netty/efd33c35-efb0-49d4-898d-2eacd8fe7647%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/f1e052f2-1b2d-487f-948b-24ee194cd574%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to