/*. * To change this license header, choose License Hea

Added on - 16 Sep 2019

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 1 of 3 pages
/** 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) {
Desklib Logo
You are reading a preview
Upload your documents to download or

Become a Desklib member to get access