Пример #1
0
 public void disconnect() {
   transmitting = false;
   receiverThread.shutDown();
   channel.disconnect();
   control.disconnected();
   setTitle("Not connected");
 }
Пример #2
0
 public void connect() {
   try {
     channel.connect("TOTAL_TOKEN_DEMO_GROUP");
   } catch (ChannelException e) {
     e.printStackTrace();
   }
   receiverThread = new ReceiverThread();
   receiverThread.start();
   Address a = channel.getAddress();
   if (a != null) setTitle(a.toString());
   else setTitle("Not connected");
   control.connected();
 }