Question: COMPUTER SCIENCE. These codes are for the client side and server side in Java Modify the following codes to improve functionality and allow the following:
COMPUTER SCIENCE.
These codes are for the client side and server side in Java
Modify the following codes to improve functionality and allow the following:
i File streaming
ii Utf
iii. Imagesphotos I mean to allow sending and receiving images
iv To accept files
CHAT APPLICATION SOURCE CODE EXAMPLE
File: MyServer.java
import java.io;
import java.net.;
public class MyServer
public static void mainString args
try
ServerSocket ssnew ServerSocket;
Socket sssaccept;establishes connection
DataInputStream disnew DataInputStreamsgetInputStream;
String strStringdisreadUTF;
System.out.printlnmessagestr;
ssclose;
catchException eSystemout.printlne;
File: MyClient.java
import java.io;
import java.net.;
public class MyClient
public static void mainString args
try
Socket snew Socketlocalhost;
DataOutputStream doutnew DataOutputStreamsgetOutputStream;
dout.writeUTFHello Server";
dout.flush;
dout.close;
sclose;
catchException eSystemout.printlne;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
