Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void OuvertureSocket() throws UnknownHostException, IOException, ClassNotFoundException{
- if (MenuBase.numeroDuJoueur == 1){
- clientFJ1 = new Socket( "127.0.0.1", 1601); // Ouverture socket
- InputStream socketIn3 = clientFJ1.getInputStream(); // Ouverture d'un flux d'entrée
- ObjectInputStream identiteJoueur1 = new ObjectInputStream(socketIn3); //Le flux d'entrée est maintenant déterminé pour les Object
- // Identite testIdentite = identiteJoueur1.readObject(); // Désérialisation de(s) object reçu
- Object test = identiteJoueur1.readObject();
- if(test !=null);
- System.out.println("c'est cool");
- System.out.println("fin reception");
- System.out.println(((Identite) test).getClass());
- System.out.println(((Identite)test).getNomPerso());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement