Java websocket client example. onopen function, shown below, .