private void updateMessage ( ClientSocket client , DataInputStream buffer , byte messageSystemId , byte from ) throws IOException { switch ( messageSystemId ) { case NetworkMessageSystemId . CONNECTING : receiveConnecting ( client , buffer , from , StateConnection . CONNECTING ) ; break ; case NetworkMessageSystemId . CONNECTED : receiveConnected ( client , from , StateConnection . CONNECTED ) ; break ; case NetworkMessageSystemId . PING : client . getOut ( ) . writeByte ( NetworkMessageSystemId . PING ) ; client . getOut ( ) . flush ( ) ; bandwidth += 1 ; break ; case NetworkMessageSystemId . OTHER_CLIENT_DISCONNECTED : receiveDisconnected ( client , from , StateConnection . CONNECTED ) ; break ; case NetworkMessageSystemId . OTHER_CLIENT_RENAMED : receiveRenamed ( client , buffer , from , StateConnection . CONNECTED ) ; break ; case NetworkMessageSystemId . USER_MESSAGE : receiveMessage ( client , buffer , from , StateConnection . CONNECTED ) ; break ; default : break ; } }
Update the message depending of its ID .