OTP Client (Java)

import java.util.*; import java.io.*; import java.net.*; class OTPClient { public static void main(String args[]) throws IOException { Scanner scan = new Scanner(System.in); System.out.println(“Connecting to the server…”); Socket clientSocket = new Socket(“localhost”, 7777); PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true); BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); // Client enters ID. This will be used by the program for verifying who // is communicating as well as check … Continue reading OTP Client (Java)