Ask a question to Desklib · AI bot

Ask NowBETA

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

Added on -2019-09-16

| 3 pages
| 469 words
| 309 views

Trusted by 2+ million users,
1000+ happy students everyday

/* * 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) {

Found this document preview useful?

You are reading a preview
Upload your documents to download
or
Become a Desklib member to get accesss

Students who viewed this