You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2019/03/18 14:43:00 UTC

[GitHub] [knox] moresandeep commented on issue #75: KNOX-1828 Fix Websocket Message Size

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:
users@infra.apache.org


With regards,
Apache Git Services