|
@ -63,22 +63,26 @@ public class client extends Thread { |
|
|
while (socketInfo.isOnline(socketid)) { |
|
|
while (socketInfo.isOnline(socketid)) { |
|
|
msg = readSocket(); |
|
|
msg = readSocket(); |
|
|
parseInput(msg); |
|
|
parseInput(msg); |
|
|
|
|
|
eventExecute(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
int id = socketInfo.findSocket.bySID(socketid); |
|
|
public void eventExecute(){ |
|
|
if(id == -1){return;} |
|
|
int id = socketInfo.findSocket.bySID(socketid); |
|
|
switch (socketInfo.EVENT.get(id)){ |
|
|
if(id == -1){return;} |
|
|
case "play": eventHandler.play(socketid); |
|
|
switch (socketInfo.EVENT.get(id)){ |
|
|
break; |
|
|
case "play": eventHandler.play(socketid); |
|
|
case "pause": eventHandler.pause(socketid); |
|
|
break; |
|
|
break; |
|
|
case "pause": eventHandler.pause(socketid); |
|
|
case "next": eventHandler.next(socketid); |
|
|
break; |
|
|
break; |
|
|
case "next": eventHandler.next(socketid); |
|
|
case "prev": eventHandler.prev(socketid); |
|
|
break; |
|
|
break; |
|
|
case "prev": eventHandler.prev(socketid); |
|
|
case "wind": eventHandler.wind(socketid); |
|
|
break; |
|
|
break; |
|
|
case "wind": eventHandler.wind(socketid); |
|
|
} |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private String bytesToStringUTFCustom(int[] ints) { |
|
|
private String bytesToStringUTFCustom(int[] ints) { |
|
|