Presentation is loading. Please wait.

Presentation is loading. Please wait.

LAN Chat server BY: VIPUL GUPTA VIKESH SINGH SUKHDEEP SINGH.

Similar presentations


Presentation on theme: "LAN Chat server BY: VIPUL GUPTA VIKESH SINGH SUKHDEEP SINGH."— Presentation transcript:

1 LAN Chat server BY: VIPUL GUPTA VIKESH SINGH SUKHDEEP SINGH

2 INTRODUCTION Common mode of communication – “CELLULAR PHONES” High service rates – Not ECONOMICAL!!!. SOLUTION ???? LAN CHAT SERVER

3 FEATURES Chatting Voice Chat File Transfer Bulletin Board Display of friend list

4 USE CASE DIAGRAM

5 CONTEXT DIAGRAM

6 DATA FLOW DIAGRAM

7

8 Networking (java.net) Network Socket Allows a single computer to serve many client at once As well as serving different information also This is managed by port Port Numbered socket on a particular machine Multiple client can connect on same port Imaginary points TCP/IP reserves the lower 1024 ports 21 for FTP,23 for Telnet, 25 for email, 80 for HTTP

9 Socket Basics A socket is a connection between two hosts. It can perform seven basic operations: Connect to a remote machine Send data Receive data Close a connection Bind to a port Listen for incoming data Accept connections from remote machines on the bound port

10 Client vs. Server Traditional definition - Client: user of Network Services - Server: Supplier of Network Services Analogy: Company phone line -I-Installing phone is like starting server -E-Extension is like port -P-Person who calls is the client : he specifies both host(general company number) & port(extension)

11

12 Working : Formation of socket to make a connection with the server Server will forward the request to specific client by making a socket connection with client For voice transfer client side data will be stored in rm format for 2-3 seconds Then it will be forwarded towards receiving client where it will be played This process of voice transfer will continue in a loop Using streams we can transfer any type of data

13 WORKING

14 Programming Basics Package: import java.net.*; import java.io.*; Opening a socket requires a hostname(or IP Address) and Port Number Socket client = new Socket(“ hostname “,port number); The URL and URL Connection classes simplify communication with web servers

15 Programming Basics(contd..) Create an input Stream to read the response from server BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream( )); Create an Output Stream that can be used to send info to the socket PrintWriter out = new PrintWriter(client.getOutputStream( )); out.println(“ Hi Dude!!”); out.print(“Howz life!!”); Close the socket when done client.close();

16 SERVER TO CLIENT COMMUNICATION CHANNEL CLIENT TO SERVER COMMUNICATION CHANNEL

17

18

19 USES : To efficiently communicate in a 1.Company 2.Institution 3.Hostel LIMITATIONS Delay of 2-3 seconds in voice transfer Server fails whole system fails

20 FUTURE EXPECTS 1.Integration of video chat using web cam. 2.Making it more secure. 3.Recovery management system.

21 THANKS…… QUERIES?????


Download ppt "LAN Chat server BY: VIPUL GUPTA VIKESH SINGH SUKHDEEP SINGH."

Similar presentations


Ads by Google