public static interface WebSocket.OnOpen
Modifier and Type | Method and Description |
---|---|
void |
onOpen(Request req,
WebSocket ws)
Inside a connect event, you can listen for
WebSocket.onMessage(OnMessage) ,
WebSocket.onClose(OnClose) or WebSocket.onError(OnError) events. |
void onOpen(Request req, WebSocket ws) throws Exception
WebSocket.onMessage(OnMessage)
,
WebSocket.onClose(OnClose)
or WebSocket.onError(OnError)
events.
Also, you can send text and binary message.req
- Current request.ws
- A web socket.Exception
- If something goes wrong while connecting.Copyright © 2018. All rights reserved.