WebSocket improvements and Jetty bump ( Mar 2, 2019 )

What's Javalin? Javalin is a very lightweight Java and Kotlin web framework which focuses on simplicity and Java/Kotlin interoperability. Read more on our landing page

Configure your WebSocketServletFactory

It’s now possible to configure the object which creates WebSocket connections in Javalin. This can be done through app.wsFactoryConfig() :

app . wsFactoryConfig { wsFactory -> wsFactory . policy . maxTextMessageSize = 1234 ; wsFactory . policy . idleTimeout = 1234 ; wsFactory . extensionFactory . register ( .. .) wsFactory . register ( .. .) }

This gives you access to a lot of low level settings for WebSockets. For details, see the Jetty docs.

Misc