You are on page 1of 19

resenLaLlon

on
Mlnor ro[ecL
1exL ChaLLlng SysLem
urpose
1he purpose of Lhls pro[ecL ls Lo enable chaLLlng beLween mulLlple cllenLs wlLh Cul
1hls !ava ChaL ls purely AW1 based no Swlng ComponenLs used and sLlll lL has a greaL
look and feel wlLh CusLomlzed colors lL ls a MulLlple CllenL 1exL ChaLLlng SofLware
1hls sofLware ls also deslgned wlLh oLhers feaLures as of rlvaLe ChaLLlng and also
provldes 1ransfer Smlles along wlLh Lhe LexL for Lhe user 1he user can lgnore anoLher
user lf he/she wanLs Lo along wlLh Lhe four groups provlded for Lhe user lL ls user
frlendly and Lhe user can even exlL Lhe program lf he/she wanLs 1hls makes lL easy Lo
use and as lL ls made ln [ava ls plaLform lndependenL 1hls resulLs ln Lhe concluslon
LhaL afLer l have compleLed Lhls pro[ecL l am sure LhaL Lhe sofLware would be useful
1he focus of Lhls pro[ecL ls Lo enable chaLLlng beLween mulLlple cllenLs
equlremenL SpeclflcaLlon
User Interface
W eyboard Mouse
ardware Interface
W A normal C
ftware Interface
W ! and Any CperaLlng SysLem
erat|ng stem Lnv|rnment
W 1he CS Lypes are
W Wlndows n1
W Wlndows x
W Wlndows 98
W Wlndows vlsLa
W Wlndows 7
W Llnux all verslons
SockeL rogrammlng
W ln compuLlng neLwork programmlng essenLlally ldenLlcal Lo sockeL programmlng
or cllenLserver programmlng lnvolves wrlLlng compuLer programs LhaL
communlcaLe wlLh oLher programs across a compuLer neLwork 1he program or
process lnlLlaLlng Lhe communlcaLlon ls called a cllenL process and Lhe program
walLlng for Lhe communlcaLlon Lo be lnlLlaLed ls Lhe server process 1he cllenL and
server processes LogeLher form a dlsLrlbuLed sysLem 1he communlcaLlon beLween
Lhe cllenL and server process may elLher be connecLlonorlenLed (such as an
esLabllshed 1C vlrLual clrculL or sesslon) or connecLlonless (based on uu
daLagrams)
W A program LhaL can acL boLh as a cllenL and a server ls based on peerLopeer
communlcaLlon
1C/l roLocol
@9$I9
1C/l encompasses a loL of smaller proLocols Lhe 1ransmlsslon ConLrol roLocol and
Lhe lnLerneL roLocol 1C performs only parL of Lhe funcLlons necessary Lo dellver Lhe
daLa beLween appllcaLlons and Lhe role LhaL lL plays ls dlrecLed Loward provldlng
servlces for Lhe appllcaLlons LhaL slL aL Lhe endpolnL compuLers
!ava SockeLs
W ln compuLer neLworklng an lnLerneL sockeL or neLwork sockeL ls an endpolnL of a
bldlrecLlonal lnLerprocess communlcaLlon flow across an lnLerneL roLocolbased
compuLer neLwork such as Lhe lnLerneL
W 1he Lerm lnLerneL sockeLs ls also used as a name for an appllcaLlon programmlng
lnLerface (Al) for Lhe 1C/l proLocol sLack usually provlded by Lhe operaLlng
sysLem lnLerneL sockeLs consLlLuLe a mechanlsm for dellverlng lncomlng daLa
packeLs Lo Lhe approprlaLe appllcaLlon process or Lhread based on a comblnaLlon
of local and remoLe l addresses and porL numbers ach sockeL ls mapped by Lhe
operaLlng sysLem Lo a communlcaLlng appllcaLlon process or Lhread
W A sockeL address ls Lhe comblnaLlon of an l address (Lhe locaLlon of Lhe
compuLer) and a porL (whlch ls mapped Lo Lhe appllcaLlon program process) lnLo a
slngle ldenLlLy much llke one end of a Lelephone connecLlon ls Lhe comblnaLlon of
a phone number and a parLlcular exLenslon
W A wellknown range of porL numbers(0 63333) ls reserved by convenLlon Lo
ldenLlfy speclflc servlce Lypes on a hosL compuLer ln Lhe cllenLserver model of
appllcaLlon archlLecLure Lhls ls used Lo provlde a mulLlplexlng servlce on each porL
number LhaL neLwork cllenLs connecL Lo for servlce lnlLlaLlon afLer whlch
communlcaLlon ls reesLabllshed on oLher connecLlonspeclflc porL numbers
W 1hese are examples of funcLlons or meLhods
W scket() creaLes a new sockeL of a cerLaln sockeL Lype ldenLlfled by an lnLeger
number and allocaLes sysLem resources Lo lL
W |nd() ls Lyplcally used on Lhe server slde and assoclaLes a sockeL wlLh a sockeL
address sLrucLure le a speclfled local porL number and l address
W |sten() ls used on Lhe server slde and causes a bound 1C sockeL Lo enLer llsLenlng
sLaLe
W cnnect() ls used on Lhe cllenL slde and asslgns a free local porL number Lo a
sockeL ln case of a 1C sockeL lL causes an aLLempL Lo esLabllsh a new 1C
connecLlon
W accet() ls used on Lhe server slde lL accepLs a recelved lncomlng aLLempL Lo
creaLe a new 1C connecLlon from Lhe remoLe cllenL and creaLes a new sockeL
assoclaLed wlLh Lhe sockeL address palr of Lhls connecLlon
W cse() causes Lhe sysLem Lo release resources allocaLed Lo a sockeL ln case of 1C
Lhe connecLlon ls LermlnaLed
Server Slde Module
W CreaLed cusLom usetObject class whlch wlll have Lhe cllenL deLalls llke username
Lhe sockeL of user and Lhe room name eLc
W When Lhe ChaL Server runs lL opens Lhe Server SockeL aL porL 1436 (we can
modlfy Loo) and llsLen for Lhe cllenL Lo connecL lf Lhe cllenL connecLs Lo Lhe server
lL wlll open a separaLe Lhread Lo servlce So when Lhe cllenL
sends ;UI@ command lL wlll close Lhe Lhread Loo lf you Lake a
look cbotcommoolcotloojovo you wlll geL all Lhe deLalls
W 1hls ls a sample code of geLLlng connecLlon from Lhe ChaL CllenL and creaLlng a
new ob[ecL of cbotcommoolcotloo ln cbotcommoolcotloo class we wlll creaLe a
Lhread Lo waLch all Lhe commands from Lhe cllenL and responds Lo Lhe cllenL Loo
W ChaLServer[ava
W whlle(Lrue
W
W SockeL sockeL serversockeLaccepL()
W ChaLCommunlcaLlon chaL new ChaLCommunlcaLlon(sockeL)
W
W
W
W ChaLCommunlcaLlon[ava
W
W ChaLCommuncaLlon(SockeL sockeL)
W
W personalsockeL sockeL
W douL new uaLaouLpuLsLream(personalsockeLgeLouLouLsLream())
W
W
CllenL Slde Module
W When Lhe ChaL CllenL runs lL wlll open a sockeL and connecL Lo cbot5etvet by
sendlng nlO klc Lo Server Cnce lL geLs connecLed Lhe chaL cllenL wlll keep Lhe
sockeL connecLlon and communlcaLe wlLh Lhe server whenever Lhe user
commands lL
W 1he baslc ldea of creaLlng a message canvas ls based on slmple loglc Whenever
users enLer Lhe message we wlll sLore lL ln arrayllsL Also ln Lhe ArrayllsL we keep
Lhe OOffset and Off5et poslLlon of each message
use Case ulagram
W 1he 1exL ChaLLlng SysLem has Lwo acLlve acLors and one correspondlng sysLem
W 1he user accesses Lhe SysLem Lhrough !ava A user communlcaLlon wlLh Lhe
sysLem ls Lhrough xLernal lnLerface 1he dlLor accesses Lhe enLlre sysLem dlrecLly
W 1he user connecLs Lo Lhe chaLLlng sysLem by connecLlng Lo Lhe server by provldlng
Lhe necessary deLalls Lo be fllled and afLer logglng ln Lhe user can chaL elLher group
or a prlvaLe chaL wlLh anoLher lndlvldual Pe/she can also lgnore a person or can
use LexL based smlles Lo be send along wlLh Lhe message
W 1he admlnlsLraLor can recLlfy any problem ln Lhe ChaLLlng SysLem lf Lhere ls any
error or any oLher problem Lo be solved
ulu
W (ata w |agram)
Cul SnapshoLs
Cbat Server



Concluslon
W AfLer we have compleLed Lhls pro[ecL we are sure LhaL Lhe problem of chaLLlng ln
an operaLlng sysLem would be overcome 1he 1exL ChaLLlng SysLem ls
compuLerlzed Lo enable mulLl user chaLLlng 1he focus of Lhls pro[ecL ls Lo provlde
Lhe cllenLs wlLh a sample user frlendly chaLLlng sysLem lL ls expecLed LhaL Lhls
pro[ecL wlll go a long way ln saLlsfylng user requlremenLs
W AfLer compleLlng Lhls pro[ecL we galned a deep knowledge of !ava we also learned
how Lo manage a pro[ecL how Lo analyze deslgn LesL and debug Lhe pro[ecL

You might also like