I want to send user agent as an extra header.
This is available in Eric Butlers library https://github.com/codebutler/android-websockets.
Wanted to go with autobahn though.
You can set additional HTTP headers to be sent during the initial opening WebSocket handshake using the headers parameter to conenct - pls see here.
This probably is missing from the interface definition (a bug), but should work nevertheless.