Permalink
Browse files

Run forever, not just once

  • Loading branch information...
1 parent 7ec713b commit c56cd761dd0ceb325e16c1a233a63a61a867a284 @bear101 bear101 committed Feb 16, 2017
Showing with 7 additions and 4 deletions.
  1. +7 −4 Examples/jTeamTalk/src/TeamTalkClient.java
@@ -11,7 +11,7 @@
import dk.bearware.ServerProperties;
import dk.bearware.SoundDevice;
import dk.bearware.SoundSystem;
-import dk.bearware.TeamTalk5;
+import dk.bearware.TeamTalk5Pro;
import dk.bearware.TeamTalkBase;
import dk.bearware.TextMessage;
import dk.bearware.User;
@@ -24,7 +24,7 @@
public class TeamTalkClient
implements ConnectionListener, CommandListener {
- TeamTalk5 ttclient = new TeamTalk5();
+ TeamTalkBase ttclient = new TeamTalk5Pro();
TeamTalkEventHandler handler = new TeamTalkEventHandler();
Map<Integer, Channel> channels = new HashMap<Integer, Channel>();
@@ -128,8 +128,11 @@ void run() {
System.err.println("Failed to join channel");
}
- // wait forever
- handler.processEvent(ttclient, -1);
+ // run forever
+ while(true) {
+ handler.processEvent(ttclient, -1);
+ System.out.println("Processed event");
+ }
}
void configureSoundDevices() {

0 comments on commit c56cd76

Please sign in to comment.