This repository has been archived on 2025-01-04. You can view files and clone it, but cannot push or open issues or pull requests.

30 lines
821 B
Java

import java.io.*;
import java.net.Socket;
public class BudaClient {
public static void main(String[] args) {
Socket sock = null;
try {
sock = new Socket("localhost", 8090);
OutputStream out= sock.getOutputStream();
BufferedReader conin = new BufferedReader(new InputStreamReader(System.in));
String line = "";
while (true) {
line = conin.readLine();
out.write(line.getBytes());
if (line.equalsIgnoreCase("Quitx")) {
break;
}
//line.startsWith() //todo: automatically handle name lengths
//TODO: Implement inputStream in.
}
} catch (IOException e) {
e.printStackTrace();
}
}
}