public static class WebSockets.Listener extends Object implements com.squareup.okhttp.ws.WebSocketListener
Constructor and Description |
---|
Listener(WebSockets.SocketListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
onClose(int code,
String reason) |
void |
onFailure(IOException e,
com.squareup.okhttp.Response res) |
void |
onMessage(com.squareup.okhttp.ResponseBody body) |
void |
onOpen(com.squareup.okhttp.ws.WebSocket webSocket,
com.squareup.okhttp.Response response) |
void |
onPong(okio.Buffer payload) |
public Listener(WebSockets.SocketListener listener)
public void onOpen(com.squareup.okhttp.ws.WebSocket webSocket, com.squareup.okhttp.Response response)
onOpen
in interface com.squareup.okhttp.ws.WebSocketListener
public void onMessage(com.squareup.okhttp.ResponseBody body) throws IOException
onMessage
in interface com.squareup.okhttp.ws.WebSocketListener
IOException
public void onPong(okio.Buffer payload)
onPong
in interface com.squareup.okhttp.ws.WebSocketListener
public void onClose(int code, String reason)
onClose
in interface com.squareup.okhttp.ws.WebSocketListener
public void onFailure(IOException e, com.squareup.okhttp.Response res)
onFailure
in interface com.squareup.okhttp.ws.WebSocketListener
Copyright © 2018. All rights reserved.