Guest User

Untitled

a guest
Jul 15th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. package com.evilwalrus.websocket;
  2.  
  3. import java.io.IOException;
  4. import java.net.URI;
  5. import java.net.URISyntaxException;
  6.  
  7. import com.evilwalrus.websocket.WebSocket.*;
  8.  
  9. public class TiWebSocketClient extends WebSocketClient {
  10. public Object proxy = null;
  11.  
  12. public void TiWebSocketClient(URI uri, WebSocketDraft draft) {
  13. super(uri, draft);
  14. }
  15.  
  16. public void setContext(Object context) {
  17. this.proxy = context;
  18. }
  19.  
  20. public void onMessage(String message) {
  21. this.proxy.onMessageCallback.call(message);
  22. }
  23.  
  24. public void onOpen() {
  25. this.proxy.onOpenCallback.call();
  26. }
  27.  
  28. public void onClose() {
  29. this.proxy.onCloseCallback.call();
  30. }
  31. }
Add Comment
Please, Sign In to add comment