We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can use a websocket through a http proxy.
The following example was provided by shuckc
public static void main( String[] args ) throws Exception { URI serverUri = new URI( "wss://ourapp.herokuapp.com:443/ws1" ); WebSocketChatClient chatclient = new WebSocketChatClient( serverUri ); Proxy proxy = new Proxy( Proxy.Type.HTTP, new InetSocketAddress( "proxy.corporate.com", 2128) ); chatclient.setProxy( proxy ); SSLContext sslContext = null; sslContext = SSLContext.getInstance( "TLS" ); sslContext.init( null, null, null ); SSLSocketFactory factory = sslContext.getSocketFactory(); chatclient.setSocketFactory( factory ); chatclient.connectBlocking(); BufferedReader reader = new BufferedReader( new InputStreamReader( System.in ) ); while ( true ) { String line = reader.readLine(); if( line.equals( "close" ) ) { chatclient.close(); } else { chatclient.send("{\"msg\":\"" + line + "\"}"); } } }
There was an error while loading. Please reload this page.