コード例 #1
0
 @Override
 public void disconnect() {
   try {
     socket.getWebSocket().close();
   } catch (IOException e) {
     e.printStackTrace();
   }
 }
コード例 #2
0
 private void send(String content) throws IOException, JSONException {
   IOMessage msg = new IOMessage(IOMessage.MESSAGE, -1, "", content);
   socket.getWebSocket().send(msg.toString());
 }
コード例 #3
0
 @Override
 public void connect(String url) throws IOException {
   socket = new IOSocket(url, new CallbackHandler(this));
   socket.connect();
 }