logo

Simple Calculator Server

   

Added on  2019-09-16

3 Pages469 Words309 Views
 | 
 | 
 | 
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */package test;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.PrintWriter;import java.net.ServerSocket;import java.net.Socket;/** * Support add, subtraction, multiplication, division * @author hluu * */public class MyServer { enum OPERATOR { ADD, SUB, MULT, DIV }; public static final int PORT_NO = 12345; /** * @param args * @throws IOException * @throws InterruptedException */ public static void main(String[] args) throws IOException, InterruptedException { ServerSocket serverSocket = new ServerSocket(PORT_NO); System.out.println("... server is accepting request"); while (true) {
Simple Calculator Server_1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents