private void unregisterAndStopServer() { try { toRouter.streams.send(DataPackage.obtain(Msg.UNREGISTER, toRouter.macAddress)); toRouter.streams.tearDownStream(); toRouter.socket.close(); } catch (Exception e) { } }
private void registerAndStartServer() { try { toRouter.streams.send(DataPackage.obtain(Msg.REGISTER, toRouter.macAddress)); } catch (IOException e) { } }