From 2326dd696501492847fd4cc53ca3ddc8332dba17 Mon Sep 17 00:00:00 2001 From: eichehome Date: Sun, 16 May 2021 20:09:23 +0200 Subject: [PATCH] Autoren der Dateien Main Client und PipeTest korrigiert. --- src/test/MainClient.java | 33 +++++++++++++-------------------- src/test/PipeTest.java | 13 ++++--------- 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/test/MainClient.java b/src/test/MainClient.java index 9872f8c..30ba94d 100644 --- a/src/test/MainClient.java +++ b/src/test/MainClient.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package test; import java.io.*; @@ -22,40 +21,34 @@ import java.net.*; import utils.Message; /** - * @author berdan + * Dies ist eine Test-Klasse + * + * @author berdan, eichehome */ - -/* - Dies ist eine Test-Klasse -*/ - - - public class MainClient { public MainClient() throws IOException, ClassNotFoundException { - System.out.println("[CLIENT] START"); - Socket socket = new Socket( "localhost", 1236 ); + System.out.println("[CLIENT] START"); + Socket socket = new Socket("localhost", 1236); System.out.println("[CLIENT] Debug1"); ObjectOutputStream oboust = new ObjectOutputStream(socket.getOutputStream()); System.out.println("[CLIENT] Debug2"); - ObjectInputStream obinstr = new ObjectInputStream(socket.getInputStream()); - System.out.println("[CLIENT] START1"); - Message senden = new Message( "berdan", "test" ); + ObjectInputStream obinstr = new ObjectInputStream(socket.getInputStream()); + System.out.println("[CLIENT] START1"); + Message senden = new Message("berdan", "test"); System.out.println(senden); //nickname=berdan, message=test // Message senden oboust.writeObject(senden); oboust.flush(); System.out.println("[CLIENT] NACHRICHT GESENDET"); - + // Message erhalten - Object erhalten = null; - - while(erhalten==null){ - erhalten = obinstr.readObject(); - System.out.println(erhalten); + + while (erhalten == null) { + erhalten = obinstr.readObject(); + System.out.println(erhalten); } System.out.println("[CLIENT] NACHRICHT ERHALTEN"); System.out.println(erhalten); //nickname=berdan, message=test diff --git a/src/test/PipeTest.java b/src/test/PipeTest.java index 5c3db65..a4d40d5 100644 --- a/src/test/PipeTest.java +++ b/src/test/PipeTest.java @@ -17,15 +17,10 @@ package test; /** - * - * @author berdan + * Dies ist eine Test-Klasse + * + * @author berdan, eichehome */ - -/* - Dies ist eine Test-Klasse -*/ - - public class PipeTest { public static void main(String[] args) { @@ -66,7 +61,7 @@ public class PipeTest { System.out.println("Letztes Element: " + pipe.lastElement); ArrayHelper test = new ArrayHelper(); - */ + */ } }