Sei sulla pagina 1di 5

UDP Based Chat Application

Objective: To build a chat application using udp sockets and enable the feature of acknowledgements after every message sent. To develop a dedicated chat application having a server and n number of udp clients. After client and server set up to connect, we need to achieve many clients to communicate through

1. peer-peer 2. File sharing . !roadcasting ". #ulticasting

Server: server receives various incoming clients$ re%uests. &t stores the information of the clients i.e. &' address and name in a list. This list is then broadcasted to all the users. (ontrary to this, whenever a client logs out, it deletes that particular client entry from its list and updates it accordingly. &t also provides a group &' to each multicast group.

Client: &t first registers itself by sending its username to the server and starts a thread which receives list of all online

users list from server. )ach user has an option of establishing a peer to peer communication with any of the online user, sending a file, creates a room where users selected by him interact with each other i.e. multicasting and sending the same message to all the online users.

1. Peer to Peer Communication: This module refers to communication between any two clients. *ender sends the re%uest containing its name and a generated random port to the receiver. After receiving the sender$s re%uest at the receiver$s end communication is established by starting a thread on both sides. +hen a network gets established between peers, a counter will be initiali,ed at both the sides which will depict the se%uence number of the packet. For every packet sent on either side there will be an acknowledgment from the other side which will increase the counter with 1. *o if any kind of failure occurs can be identified and a packet may be sent again. For e-ample. &f A sends a message with se%uence number 1/ to !, ! will reply back with an acknowledgement with se%uence number 11.

2.

ulticastin!:

+hen a user wants to create a chat room for multiple users, it sends a re%uest to the server. *erver then acknowledges this re%uest by providing a group &' and sends the information about the room to all the concerned users. 0ow, in this room whenever a user wants to send a message it will be multicast to all the users through the group &'.

". #ile Sendin!: &n this module there would be feature in our chat window which would allow the user to send a file through the network to the other user. +hen any user wants to send a file to other user a message would appear on the receiver$s side that whether he1she wants to accept it or not. After the acceptance from the receiver whole file would be read and send it to the receiver in the segments of 23,/// bytes and finally at the receiver$s end the segments would be received and stored in a buffer and clubbed according to the se%uence number. There would be confirmation message after receiving the file.

$. Broadcastin!: Any of the online users can send the message to all the online users.

%he &ollo'in! are S(stem :

the &unctions o&

ulti User Chat

1) Start the Server: #irst start the server* then onl( clients lo!in to chat rooms. 24 Client +o!in: in this clients enter into chat rooms by entering the nick name server 0ame and server port number. 4 See all Online People: +hen ever we entered into chat room then we can see the all the people who are online. "4 Send Public essa!e: +e can send the messages to all the on line people. 34 Send Private essa!es: +e want to send messages to only a particular user then we change the room from general room. 24 Sendin! ,mote -cons: !y 5sing this 5sers sending not only te-t message but also sending emotion icons. They e-press user feeling very clearly. 64 -!nore Users: we does into want to chat with particular user then user ignores messages send by that user. 74 Allo' Users: +e allow all &gnored 5sers by clicking the allow user button. 84 +o! out. &f 5sers does into want to chat with any person then sign out from messenger. &t is also providing security from unauthori,ed persons. #eatures o& the ulti User Chat S(stem:

14 &t is very useful to chat peoples with in the network area. 24 +e can e-press out feelings very easily by sending )moticons.

HARDWARE AND SOFTWARE REQUIREMENTS

So&t'are re.uirements: Technologies . :perating *ystem . Hardware requirements: Processor Processor Speed RAM : : : &ntel 'entium based system 23/ #<, to 7 #<, 127 #! to 2 =! core 9ava +indows 2/// 'rof1;'.

Potrebbero piacerti anche