Java (Assignment) Saksham Agrawal
Java (Assignment) Saksham Agrawal
Subject Date.:
Auignmunt-2
Setion-A
4
JaNa sokd
betuwn te apalicatin unning en diyunt IKE.
Tawe sorkt pognammg cam becn neton ismted a
Conneton Jea. Sokt and seA Jokot clas
and DatnganaSatket
Qmd Daa ananlacket ars Rd fau cennictin-Ju seokit
-piagomniang
2 hdhat e Port umben 2
to Auuhlch anatnet athA nituek mRe J o be
Subject
Deta
CLIENT SERVER
ISscket Socketl
OPEN Listtn
Connxction
Reavest
Conrect
Clent/
Session
Taloset
Erd File
ScKET API
S.
hat te u of ohen Canneetiam mithadin URL lau 2
Sectien-B
4. hAP t diehlay the HrTPAade ey fieldu and
Va
Connectian keep-alive
Cache Control = max-age =8600
Exbires Thu9Sep 202y 22:22: 20 nmT
Location = hths: wwW javathoint Corm aya - Hutoral
founat
(V)
22 BcoN 13S
Subjoct Cate
faznmat
alcebback AddhuD (J: Rtunu true
Metnd
Addres
Class MuStrver
public atahc Vaid main CSthring (1 ang) throws Fxcehton
Sener Sacket ss new Server Socket 3333)
Socket s = SS -aceht (
Datn inh1dstram din nto Data EnhudSheta m(SsqetInzut Shazm))
Datn Outal Shreom dout = nauo DataluthutSteeaml Spetluthut ShreamlDl
Bulained Raadte brneus Buttred Readtr (nt ZnpuShênm Beockr
Lsyskemin));
while (Ich -eaquals (lsaj"))
Str din read TÂ (0}
Sysienm oubprintin litnt ~ay "+ Str);
str2 br.reodline ()
226coNtL9r
dùn-clase
lk Malient jaua
class Nlient
S-clese
226coN 95
Subjeet Date.
3.
inmport
puli class Server
public ztahe void nain ( String arysci hrouas Exception
22ßCoNI95
Subject Date:
ds-receive Cde)
liemt