moresandeep commented on issue #75: KNOX-1828 Fix Websocket Message Size
URL: https://github.com/apache/knox/pull/75#issuecomment-473939005
 
 
   > @moresandeep That will fix the backendsession but to fix the container 
I'll have to explicity cast it ClientContainer and modify the policy because 
ContainerProvider.getWebSocketContainer() and the Jetty code behind it sets the 
defaults.
   
   Sorry, I did not get it, what I mean is this, in the ProxyWebSocketAdapter 
class, pass a map of gateway config variables, something like
   
   <pre>
   public ProxyWebSocketAdapter(final URI backend, final ExecutorService pool, 
final ClientEndpointConfig clientConfig, final Map<String, Long> config) {
       super();
       this.backend = backend;
       this.pool = pool;
       this.clientConfig = clientConfig;
       this.gatewayConfig = config;
     }
   </pre>
   
   then in `public void onWebSocketConnect(final Session frontEndSession)` 
   you can have
   
   
`container.setAsyncSendTimeout(gatewayConfig.get(DEFAULT_WEBSOCKET_MAX_TEXT_MESSAGE_BUFFER_SIZE));`
   ..... 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to