public void disconnect() { transmitting = false; receiverThread.shutDown(); channel.disconnect(); control.disconnected(); setTitle("Not connected"); }
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(); }