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

Added on - 16 Sep 2019

  • Dissertation

    type

  • 3

    pages

  • 469

    words

  • 109

    views

  • 0

    downloads

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’re reading a preview
card-image

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Unlock This Document