}
}
+ public SocketClient(boolean withoStream) {
+ // établie une connexion au serveur par un appel
+ // à connexionServeur()
+ attributesInit();
+ try {
+ connexionServeur("localhost", 5000, withoStream);
+ }
+ catch (IOException e) {
+ System.err.println("IOException: " + e);
+ e.printStackTrace();
+ closeRWIO();
+ }
+ }
+
private void connexionServeur(String adresseIPServeur, int portServeur, boolean hasoStream) throws IOException {
// créer un objet socket lié au socket serveur et l'affecte à sock
// puis établie les chaînages de flot nécessaires