chapter_009/src/main/java/ru/job4j/socket/Client.java
/**
     * Start application of a client.
     */
Start application of a client.
Start application of a client .
public void start() {
        try (PrintWriter out = new PrintWriter(this.socket.getOutputStream(), true);
             BufferedReader in = new BufferedReader(new InputStreamReader(this.socket.getInputStream()))) {
            out.println("hello");
            String str;
            do {
                str = in.readLine();
                out.println(str);
                System.out.println(str);
            }
            while (!str.equals("exit"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
public void start ( ) { try ( PrintWriter out = new PrintWriter ( this . socket . getOutputStream ( ) , true ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( this . socket . getInputStream ( ) ) ) ) { out . println ( "hello" ) ; String str ; do { str = in . readLine ( ) ; out . println ( str ) ; System . out . println ( str ) ; } while ( ! str . equals ( "exit" ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
Start application of a client.
Start application of a client .