Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sockets In this lab, you will be working with Sockets. 1 . ) Sending a String: Build 2 classes, one A Server ( ServerString ,

Sockets
In this lab, you will be working with Sockets.
1.) Sending a String: Build 2 classes, one A Server(ServerString,java) that sends a single String message and the second, a Client(ClientString.java) that receives the message and prints it to the Console. No GUI programming is needed. Have these 2 classes work in separate DOS windows. You will need 2 DOS Windows to test these classes out. Run the Server first in one DOS Window, then run the Client in the Second DOS Window. At first, run the 2 classes on the same machine. After you get them working on one machine, you may want to try to run the classes on 2 different machines(optional).
(For Part 2, you must Use DatalnputStream and
DataOutputStream.)
2.) Sending Integers: Build 2 classes, one A Client(Clientint.java) that sends say 5 integers; the second, a Server(Serverint.java) that receives the 5 integers and prints them to the Console. The Server should continue to read data from the Client until it reads a 0(zero) from the Client. Have these 2 classes work in DOS windows. You will need 2 DOS Windows to test these classes out. Run the Server first in one DOS Window, then run the Client in the Second DOS Window. At first, run the 2 classes on the same machine. After you get them working on one machine, you may want to try to run the classes on 2 different machines(optional).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data And Hadoop Fundamentals Tools And Techniques For Data Driven Success

Authors: Mayank Bhushan

2nd Edition

9355516665, 978-9355516664

More Books

Students also viewed these Databases questions

Question

4-6 Is there a digital divide? If so, why does it matter?

Answered: 1 week ago