Question: 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).
 Sockets In this lab, you will be working with Sockets. 1.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!