Skip to content

Commit

Permalink
Update Client.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedi6431 authored Jun 16, 2024
1 parent 62bdbdb commit fc2efc0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Client.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
//This software is protected by Fedi6431© copyrights
import java.io.*;
import java.net.*;

public class Client {
private Socket socket = null;
private DataInputStream input = null;
private BufferedReader input = null;
private DataOutputStream output = null;

public Client(String address, int port) {
Expand All @@ -15,8 +14,8 @@ public Client(String address, int port) {
socket = new Socket(address, port);
System.out.println("Client connected");

// get input from the terminal
input = new DataInputStream(System.in);
// get input from the terminal using BufferedReader
input = new BufferedReader(new InputStreamReader(System.in));
// send output to the server socket
output = new DataOutputStream(socket.getOutputStream());

Expand Down

0 comments on commit fc2efc0

Please sign in to comment.