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